pub struct PrefixDetector(pub &'static [u8]);Expand description
PrefixDetector detects a certain prefix from the input stream.
If the prefix matches, it returns true and the wrapped input stream with the prefix data. Otherwise, it returns false and the input stream with the prefix data(the prefix maybe less than the static str’s length).
Tuple Fields§
§0: &'static [u8]Trait Implementations§
Auto Trait Implementations§
impl Freeze for PrefixDetector
impl RefUnwindSafe for PrefixDetector
impl Send for PrefixDetector
impl Sync for PrefixDetector
impl Unpin for PrefixDetector
impl UnwindSafe for PrefixDetector
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