On this page
Enum std::str::pattern::SearchStep
pub enum SearchStep {
Match(usize, usize),
Reject(usize, usize),
Done,
}
pattern
#27721)
Result of calling Searcher::next()
or ReverseSearcher::next_back()
.
Variants
Match(usize, usize)
pattern
#27721)
Expresses that a match of the pattern has been found at haystack[a..b]
.
Reject(usize, usize)
pattern
#27721)
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
pattern
#27721)
Expresses that every byte of the haystack has been visited, ending the iteration.
Trait Implementations
impl Clone for SearchStep
fn clone(&self) -> SearchStep
fn clone_from(&mut self, source: &Self)
source
. Read more
impl Debug for SearchStep
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
impl PartialEq for SearchStep
fn eq(&self, other: &SearchStep) -> bool
self
and other
values to be equal, and is used by ==
.
fn ne(&self, other: &Rhs) -> bool
!=
. The default implementation is almost always sufficient, and should not be overridden without very good reason.
impl Copy for SearchStep
impl Eq for SearchStep
impl StructuralEq for SearchStep
impl StructuralPartialEq for SearchStep
Auto Trait Implementations
impl RefUnwindSafe for SearchStep
impl Send for SearchStep
impl Sync for SearchStep
impl Unpin for SearchStep
impl UnwindSafe for SearchStep
Blanket Implementations
impl<T> Any for T
where
T: 'static + ?Sized,
impl<T> Borrow<T> for T
where
T: ?Sized,
impl<T> BorrowMut<T> for T
where
T: ?Sized,
impl<T> From<T> for T
fn from(t: T) -> T
Returns the argument unchanged.
impl<T, U> Into<U> for T
where
U: From<T>,
fn into(self) -> U
Calls U::from(self)
.
That is, this conversion is whatever the implementation of From<T> for U
chooses to do.
impl<T> ToOwned for T
where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)
impl<T, U> TryFrom<U> for T
where
U: Into<T>,
type Error = Infallible
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for T
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/str/pattern/enum.SearchStep.html