pub enum FrameError {
Io(Error),
TooLarge(u32),
Varint,
Decode(Error),
}Expand description
Errors produced by the framing helpers. The handler-layer mapping to QUIC application error codes lives in the node crate.
Variants§
Io(Error)
The underlying stream failed while reading or writing the frame.
TooLarge(u32)
The length prefix names more bytes than MAX_MESSAGE_SIZE allows.
Rejected before anything is buffered.
Varint
The length prefix is not a well-formed varint — a non-terminating
continuation run through all five bytes, or a fifth byte overflowing
u32. A short or empty buffer reads as truncated, not malformed.
Decode(Error)
The frame’s bytes are not a valid postcard encoding of the expected message.
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<Error> for FrameError
impl From<Error> for FrameError
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