pub struct Decoded<T> {
pub item: Option<T>,
pub remains: usize,
pub consumed: usize,
}Expand description
Result of a single decode attempt.
Fields§
§item: Option<T>The decoded item, or None when the codec needs more input.
remains: usizeBytes left in the application-facing read buffer after the attempt.
consumed: usizeBytes consumed from the read buffer by the attempt.
Trait Implementations§
impl<T: Eq> Eq for Decoded<T>
Source§impl<T: Ord> Ord for Decoded<T>
impl<T: Ord> Ord for Decoded<T>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd> PartialOrd for Decoded<T>
impl<T: PartialOrd> PartialOrd for Decoded<T>
impl<T: PartialEq> StructuralPartialEq for Decoded<T>
Auto Trait Implementations§
impl<T> Freeze for Decoded<T>where
T: Freeze,
impl<T> RefUnwindSafe for Decoded<T>where
T: RefUnwindSafe,
impl<T> Send for Decoded<T>where
T: Send,
impl<T> Sync for Decoded<T>where
T: Sync,
impl<T> Unpin for Decoded<T>where
T: Unpin,
impl<T> UnsafeUnpin for Decoded<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Decoded<T>where
T: UnwindSafe,
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.