pub enum DecodeError {
Truncated,
Bad,
WrongShape,
BadNumeric,
BadRole,
}Expand description
Errors decode can surface.
Variants§
Truncated
Buffer holds fewer bytes than the framed message header claims — read more from the socket and retry.
Bad
Bytes don’t parse as a RESP multi-bulk (malformed envelope).
WrongShape
Verb was missing, unknown, or had the wrong arity for its
shape (e.g. HB with 3 args instead of 5).
BadNumeric
A numeric field (epoch / offset) was not a valid decimal
u64.
BadRole
A role field on HB was not one of primary / replica
/ candidate.
Trait Implementations§
Source§impl Debug for DecodeError
impl Debug for DecodeError
impl Eq for DecodeError
Source§impl PartialEq for DecodeError
impl PartialEq for DecodeError
Source§fn eq(&self, other: &DecodeError) -> bool
fn eq(&self, other: &DecodeError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DecodeError
Auto Trait Implementations§
impl Freeze for DecodeError
impl RefUnwindSafe for DecodeError
impl Send for DecodeError
impl Sync for DecodeError
impl Unpin for DecodeError
impl UnsafeUnpin for DecodeError
impl UnwindSafe for DecodeError
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