pub enum Decoded {
Frame(Value, usize),
More(usize),
}Expand description
Result of attempting to decode one frame from the head of a buffer —
mirrors the reference decoder’s three-way {ok,_,_} / {more,_} /
{error,_} contract, adapted to return a consumed-byte count instead
of a remainder slice (equally usable, more idiomatic here).
Variants§
Frame(Value, usize)
A complete frame was decoded, consuming this many bytes from the front of the buffer.
More(usize)
The buffer doesn’t yet hold a complete frame; at least this many more bytes are needed before trying again.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Decoded
impl RefUnwindSafe for Decoded
impl Send for Decoded
impl Sync for Decoded
impl Unpin for Decoded
impl UnsafeUnpin for Decoded
impl UnwindSafe for Decoded
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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