pub enum CodecError {
Decode(String),
Encode(String),
PayloadSizeMismatch,
UnknownEnumValue(u32),
}Expand description
Unified codec error type used by every codec in the stack.
GTP, GAP and GSP all return this error so that callers can handle decoding failures uniformly without having to know which sub-protocol was being parsed.
Variants§
Decode(String)
CBOR decoding failure.
Encode(String)
CBOR encoding failure (practically unreachable when writing to a Vec).
PayloadSizeMismatch
A length field inside the frame does not match the actual payload
length (payload_size, content_length, args_length, …).
UnknownEnumValue(u32)
An unknown enum value was observed (for example an out-of-range
stream_type or signal_type).
Trait Implementations§
Source§impl Debug for CodecError
impl Debug for CodecError
Source§impl Display for CodecError
impl Display for CodecError
Source§impl Error for CodecError
impl Error for CodecError
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 CodecError
impl RefUnwindSafe for CodecError
impl Send for CodecError
impl Sync for CodecError
impl Unpin for CodecError
impl UnsafeUnpin for CodecError
impl UnwindSafe for CodecError
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