pub struct Match<'a> { /* private fields */ }Expand description
One actual forward-search match retained on its exact immutable source.
Implementations§
Source§impl<'a> Match<'a>
impl<'a> Match<'a>
pub fn find(byte: u8, bytes: &'a [u8]) -> Option<Self>
pub fn find2(first: u8, second: u8, bytes: &'a [u8]) -> Option<Self>
pub const fn start(self) -> usize
pub const fn end(self) -> NonZero<usize>
pub fn byte(self) -> u8
pub fn prefix(self) -> &'a [u8] ⓘ
pub fn through(self) -> &'a [u8] ⓘ
pub fn tail(self) -> &'a [u8] ⓘ
pub fn suffix(self) -> &'a [u8] ⓘ
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Match<'a>
impl<'a> RefUnwindSafe for Match<'a>
impl<'a> Send for Match<'a>
impl<'a> Sync for Match<'a>
impl<'a> Unpin for Match<'a>
impl<'a> UnsafeUnpin for Match<'a>
impl<'a> UnwindSafe for Match<'a>
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