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