pub struct Slice<'de> { /* private fields */ }Expand description
A simple Flavor representing the deserialization from a borrowed slice
Implementations§
Trait Implementations§
Source§impl<'de> Flavor<'de> for Slice<'de>
impl<'de> Flavor<'de> for Slice<'de>
Source§fn finalize(self) -> Result<&'de [u8]>
fn finalize(self) -> Result<&'de [u8]>
Return the remaining (unused) bytes in the Deserializer
Source§type Remainder = &'de [u8]
type Remainder = &'de [u8]
The remaining data of this flavor after deserializing has completed. Read more
Source§fn size_hint(&self) -> Option<usize>
fn size_hint(&self) -> Option<usize>
Returns the number of bytes remaining in the message, if known. Read more
Auto Trait Implementations§
impl<'de> Freeze for Slice<'de>
impl<'de> RefUnwindSafe for Slice<'de>
impl<'de> !Send for Slice<'de>
impl<'de> !Sync for Slice<'de>
impl<'de> Unpin for Slice<'de>
impl<'de> UnwindSafe for Slice<'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
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.