pub enum DecodeIterError {
Eof,
NeedMore,
Malformed(ContextError),
}Expand description
Boundary error type surfaced by Decoder::next
These will all be coerced into the loop stopping. The decoder must be fed more bytes before the loop can continue
Variants§
Eof
The buffer is empty and no more bytes are available
NeedMore
The packet is not done decoding yet - incompete
Malformed(ContextError)
The bytes present in the buffer could not be parsed as the target
type. The Decoder has already advanced past the offending bytes
(drained the framed packet, or the consumed prefix in resume mode)
to guarantee forward progress on subsequent calls
Trait Implementations§
Source§impl Debug for DecodeIterError
impl Debug for DecodeIterError
Source§impl Display for DecodeIterError
impl Display for DecodeIterError
Source§impl Error for DecodeIterError
impl Error for DecodeIterError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for DecodeIterError
impl !RefUnwindSafe for DecodeIterError
impl Send for DecodeIterError
impl Sync for DecodeIterError
impl Unpin for DecodeIterError
impl UnsafeUnpin for DecodeIterError
impl !UnwindSafe for DecodeIterError
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