Enum std::str::pattern::SearchStep
source · pub enum SearchStep {
Match(usize, usize),
Reject(usize, usize),
Done,
}
🔬This is a nightly-only experimental API. (
pattern
#27721)Expand description
调用 Searcher::next()
或 ReverseSearcher::next_back()
的结果。
Variants§
Match(usize, usize)
🔬This is a nightly-only experimental API. (
pattern
#27721)表示已在 haystack[a..b]
找到匹配的模式。
Reject(usize, usize)
🔬This is a nightly-only experimental API. (
pattern
#27721)表示已拒绝 haystack[a..b]
作为该模式的可能匹配。
注意,两个 Match
之间可能有多个 Reject
,不需要将它们组合为一个。
Done
🔬This is a nightly-only experimental API. (
pattern
#27721)表示已访问 haystack 的每个字节,从而结束了迭代。
Trait Implementations§
source§impl Clone for SearchStep
impl Clone for SearchStep
source§fn clone(&self) -> SearchStep
fn clone(&self) -> SearchStep
返回值的副本。 Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
从
source
执行复制分配。 Read moresource§impl Debug for SearchStep
impl Debug for SearchStep
source§impl PartialEq<SearchStep> for SearchStep
impl PartialEq<SearchStep> for SearchStep
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
从拥有的值中借用。 Read more