#[non_exhaustive]pub enum FrameHeaderParseError {
HeaderIoError(Error),
FrameFromClient,
FrameFromServer,
VersionNotSupported(u8),
UnknownResponseOpcode(TryFromPrimitiveError<u8>),
BodyChunkIoError(usize, Error),
ConnectionClosed(usize, usize),
}
Expand description
An error that occurred during frame header deserialization.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
HeaderIoError(Error)
Failed to read the frame header from the socket.
FrameFromClient
Received a frame marked as coming from a client.
FrameFromServer
VersionNotSupported(u8)
Received a frame with unsupported version.
UnknownResponseOpcode(TryFromPrimitiveError<u8>)
Received unknown response opcode.
BodyChunkIoError(usize, Error)
Failed to read frame body from the socket.
ConnectionClosed(usize, usize)
Connection was closed before whole frame was read.
Trait Implementations§
source§impl Debug for FrameHeaderParseError
impl Debug for FrameHeaderParseError
source§impl Display for FrameHeaderParseError
impl Display for FrameHeaderParseError
source§impl Error for FrameHeaderParseError
impl Error for FrameHeaderParseError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<TryFromPrimitiveError<u8>> for FrameHeaderParseError
impl From<TryFromPrimitiveError<u8>> for FrameHeaderParseError
source§fn from(source: TryFromPrimitiveError<u8>) -> Self
fn from(source: TryFromPrimitiveError<u8>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FrameHeaderParseError
impl !RefUnwindSafe for FrameHeaderParseError
impl Send for FrameHeaderParseError
impl Sync for FrameHeaderParseError
impl Unpin for FrameHeaderParseError
impl !UnwindSafe for FrameHeaderParseError
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