pub enum FrameError {
Truncated {
needed: usize,
had: usize,
},
UnknownTag(u8),
Payload(WireError),
Malformed(String),
}Expand description
Errors decoding a Frame from bytes.
Variants§
Truncated
Buffer ended before a full header or the declared payload was read.
UnknownTag(u8)
The tag byte was not one of the known frame tags.
Payload(WireError)
The ERROR frame payload failed to decode as a PluginError.
Malformed(String)
An END or ERROR frame declared a payload length it must not have, or
trailing bytes followed a terminal frame in a single-frame decode.
Trait Implementations§
Source§impl Debug for FrameError
impl Debug for FrameError
Source§impl Display for FrameError
impl Display for FrameError
Source§impl Error for FrameError
impl Error for FrameError
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<WireError> for FrameError
impl From<WireError> for FrameError
Source§fn from(source: WireError) -> FrameError
fn from(source: WireError) -> FrameError
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for FrameError
impl !UnwindSafe for FrameError
impl Freeze for FrameError
impl Send for FrameError
impl Sync for FrameError
impl Unpin for FrameError
impl UnsafeUnpin for FrameError
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