pub enum DecoderStatus {
NeedsMore,
Ready,
}Expand description
Indicates whether a decoder needs more data or is ready to finalize.
This is returned from the Decoder::push_bytes method to indicate whether the decoder
should continue accumulating data or is ready to produce the decoded value with Decoder::end.
Variants§
NeedsMore
The decoder needs more data to complete decoding.
Continue pushing byte slices with Decoder::push_bytes until this status changes to
Ready.
Ready
The decoder has accumulated sufficient data and is ready to finalize.
Call Decoder::end to complete the decoding process and obtain the final result.
Implementations§
Source§impl DecoderStatus
impl DecoderStatus
Sourcepub fn needs_more(&self) -> bool
pub fn needs_more(&self) -> bool
Returns true if the decoder needs more data to continue.
Sourcepub fn is_ready(&self) -> bool
pub fn is_ready(&self) -> bool
Returns true if ready to produce decoded value with Decoder::end.
Trait Implementations§
Source§impl Clone for DecoderStatus
impl Clone for DecoderStatus
Source§fn clone(&self) -> DecoderStatus
fn clone(&self) -> DecoderStatus
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DecoderStatus
impl Debug for DecoderStatus
Source§impl PartialEq for DecoderStatus
impl PartialEq for DecoderStatus
Source§fn eq(&self, other: &DecoderStatus) -> bool
fn eq(&self, other: &DecoderStatus) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for DecoderStatus
impl Eq for DecoderStatus
impl StructuralPartialEq for DecoderStatus
Auto Trait Implementations§
impl Freeze for DecoderStatus
impl RefUnwindSafe for DecoderStatus
impl Send for DecoderStatus
impl Sync for DecoderStatus
impl Unpin for DecoderStatus
impl UnsafeUnpin for DecoderStatus
impl UnwindSafe for DecoderStatus
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