pub enum PeekResult<S, E> {
Found {
end_slice: usize,
start: S,
end: E,
},
NotFound,
}Expand description
The result of a peeking operation.
A PeekResult contains the result of attempting to match a Peekable
against the current position of a Scanner. If the match succeeds, a
Found is returned with the length of the end slice, the start of the
match, and the end of the match. If the match fails, a NotFound is
returned.
Variants§
Trait Implementations§
impl<S, E> StructuralPartialEq for PeekResult<S, E>
Auto Trait Implementations§
impl<S, E> Freeze for PeekResult<S, E>
impl<S, E> RefUnwindSafe for PeekResult<S, E>where
S: RefUnwindSafe,
E: RefUnwindSafe,
impl<S, E> Send for PeekResult<S, E>
impl<S, E> Sync for PeekResult<S, E>
impl<S, E> Unpin for PeekResult<S, E>
impl<S, E> UnwindSafe for PeekResult<S, E>where
S: UnwindSafe,
E: UnwindSafe,
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