# Enum alloc::str::pattern::SearchStep
[−][src]

    pub enum SearchStep {
        Match(usize, usize),
        Reject(usize, usize),
        Done,
    }

🔬 This is a nightly-only experimental API. (`pattern` #27721)

API not fully fleshed out and ready to be stabilized

Expand description

Result of calling `Searcher::next()` or `ReverseSearcher::next_back()`.

## Variants

`Match(usize, usize)`
🔬 This is a nightly-only experimental API. (`pattern` #27721)

API not fully fleshed out and ready to be stabilized

Expresses that a match of the pattern has been found at `haystack[a..b]`.

`Reject(usize, usize)`
🔬 This is a nightly-only experimental API. (`pattern` #27721)

API not fully fleshed out and ready to be stabilized

Expresses that `haystack[a..b]` has been rejected as a possible match of the pattern.

Note that there might be more than one `Reject` between two `Match`es, there is no requirement for them to be combined into one.

`Done`
🔬 This is a nightly-only experimental API. (`pattern` #27721)

API not fully fleshed out and ready to be stabilized

Expresses that every byte of the haystack has been visited, ending the iteration.

## Trait Implementations

[src]

### impl Clone for SearchStep

[src]

#### pub fn clone(&self) -> SearchStep

Returns a copy of the value. Read more

1.0.0[src]

#### fn clone_from(&mut self, source: &Self)

Performs copy-assignment from `source`. Read more

[src]

### impl Debug for SearchStep

[src]

#### pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

[src]

### impl PartialEq<SearchStep> for SearchStep

[src]

#### pub fn eq(&self, other: &SearchStep) -> bool

This method tests for `self` and `other` values to be equal, and is used by `==`. Read more

[src]

#### pub fn ne(&self, other: &SearchStep) -> bool

This method tests for `!=`.

[src]

### impl Copy for SearchStep

[src]

### impl Eq for SearchStep

[src]

### impl StructuralEq for SearchStep

[src]

### impl StructuralPartialEq for SearchStep

## Auto Trait Implementations

### impl Send for SearchStep

### impl Sync for SearchStep

### impl Unpin for SearchStep

## Blanket Implementations

[src]

### impl<T> Any for T where
T: 'static + ?Sized,

[src]

#### pub fn type_id(&self) -> TypeId

Gets the `TypeId` of `self`. Read more

[src]

### impl<T> Borrow<T> for T where
T: ?Sized,

[src]

#### pub fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more

[src]

### impl<T> BorrowMut<T> for T where
T: ?Sized,

[src]

#### pub fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more

[src]

### impl<T> From<T> for T

[src]

#### pub fn from(t: T) -> T

Performs the conversion.

[src]

### impl<T, U> Into<U> for T where
U: From<T>,

[src]

#### pub fn into(self) -> U

Performs the conversion.

[src]

### impl<T> ToOwned for T where
T: Clone,

#### type Owned = T

The resulting type after obtaining ownership.

[src]

#### pub fn to_owned(&Self) -> T

Creates owned data from borrowed data, usually by cloning. Read more

[src]

#### pub fn clone_into(&Self, &mut T)

🔬 This is a nightly-only experimental API. (`toowned_clone_into` #41263)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

[src]

### impl<T, U> TryFrom<U> for T where
U: Into<T>,

#### type Error = Infallible

The type returned in the event of a conversion error.

[src]

#### pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.

[src]

### impl<T, U> TryInto<U> for T where
U: TryFrom<T>,

#### type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

[src]

#### pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.