pub struct Slicer<'de> { /* private fields */ }Expand description
Takes a slice as input and divides it into smaller slices.
For example &[1, 2, 3, 4] --> &[1, 2] and &[3, 4].
Uses:
- Used by
MessageSlicerto help those implementingDecodeMessage’sfrom_bytes. - When parsing formats within formats. For example, the DHCP format has an options field that contains TLV formatted options.
Implementations§
Auto Trait Implementations§
impl<'de> Freeze for Slicer<'de>
impl<'de> RefUnwindSafe for Slicer<'de>
impl<'de> Send for Slicer<'de>
impl<'de> Sync for Slicer<'de>
impl<'de> Unpin for Slicer<'de>
impl<'de> UnwindSafe for Slicer<'de>
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