pub enum KvpError {
MissingLength,
ValueTooLong(usize),
UnexpectedEnd,
VarInt(VarIntError),
}Expand description
Errors produced when encoding or decoding key-value pairs.
Variants§
MissingLength
Odd key type was not followed by a length-prefixed value.
ValueTooLong(usize)
Value length exceeds MAX_KVP_VALUE_LEN.
UnexpectedEnd
Not enough bytes in the buffer to complete decoding.
VarInt(VarIntError)
Variable-length integer encoding/decoding error.
Trait Implementations§
Source§impl Error for KvpError
impl Error for KvpError
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()
Source§impl From<KvpError> for CodecError
impl From<KvpError> for CodecError
Source§impl From<VarIntError> for KvpError
impl From<VarIntError> for KvpError
Source§fn from(source: VarIntError) -> Self
fn from(source: VarIntError) -> Self
Converts to this type from the input type.
impl Eq for KvpError
impl StructuralPartialEq for KvpError
Auto Trait Implementations§
impl Freeze for KvpError
impl RefUnwindSafe for KvpError
impl Send for KvpError
impl Sync for KvpError
impl Unpin for KvpError
impl UnsafeUnpin for KvpError
impl UnwindSafe for KvpError
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