pub enum PeekResult {
Matches(Vec<Match>),
MatchesReachedEnd(Vec<Match>),
MatchesReachedModeSwitch((Vec<Match>, usize)),
NotFound,
}Expand description
The result of a peek operation.
Variants§
Matches(Vec<Match>)
The peek operation found n matches.
MatchesReachedEnd(Vec<Match>)
The peek operation found less than n matches because the end of the haystack was reached.
MatchesReachedModeSwitch((Vec<Match>, usize))
The peek operation found less than n matches because the last token type would have triggered a mode switch. The matches are returned along with the index of the new mode that would be switched to on the last match.
NotFound
The peek operation found no matches.
Trait Implementations§
Source§impl Debug for PeekResult
impl Debug for PeekResult
Source§impl PartialEq for PeekResult
impl PartialEq for PeekResult
impl StructuralPartialEq for PeekResult
Auto Trait Implementations§
impl Freeze for PeekResult
impl RefUnwindSafe for PeekResult
impl Send for PeekResult
impl Sync for PeekResult
impl Unpin for PeekResult
impl UnwindSafe for PeekResult
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
Mutably borrows from an owned value. Read more