pub enum Frame {
Value {
start: usize,
end: usize,
consumed: usize,
},
Incomplete {
consumed: usize,
},
End,
}Expand description
The result of StreamDeserializer::frame.
Variants§
Value
The next value is complete.
Its bytes are input[start..end]. Afterwards the first consumed
bytes of the input (at least up to end) are discarded, the bytes
before start are skipped.
Incomplete
The input does not contain a complete value.
The first consumed bytes of the input are discarded, for instance
whitespace before the next value. If bytes were consumed, the
deserializer is invoked again right away (as a value might follow
them), otherwise once more input was read. At the end of the input
the deserializer must not return this without consuming bytes.
End
There are no more values.
This must only be returned at the end of the input.
Trait Implementations§
impl Copy for Frame
impl Eq for Frame
impl StructuralPartialEq for Frame
Auto Trait Implementations§
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnsafeUnpin for Frame
impl UnwindSafe for Frame
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.