pub enum FoundToken<'a, T: Clone> {
Found {
offset: usize,
token: &'a Token<T>,
},
EndOfData {
remaining_length: usize,
},
NotFound,
}Available on crate feature
std only.Expand description
Used as a return type to provide:
Found if a token was found, which token, and where
EndOfData the scanner hit the end of the buffer/EOF before finding the token
NotFound if there is no more data in the buffer
Variants§
Auto Trait Implementations§
impl<'a, T> Freeze for FoundToken<'a, T>
impl<'a, T> RefUnwindSafe for FoundToken<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for FoundToken<'a, T>where
T: Sync,
impl<'a, T> Sync for FoundToken<'a, T>where
T: Sync,
impl<'a, T> Unpin for FoundToken<'a, T>
impl<'a, T> UnwindSafe for FoundToken<'a, T>where
T: RefUnwindSafe,
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