pub enum PacketParseError {
InvalidConnectPacket(Error),
InvalidPacketType(Option<char>),
InvalidPacketPayload,
InvalidPacketLen,
InvalidUtf8Boundary(Utf8Error),
Base64Decode(DecodeError),
PayloadTooLarge {
max: u64,
},
}Expand description
An error that occurs when parsing a packet.
Variants§
InvalidConnectPacket(Error)
Invalid connect packet
InvalidPacketType(Option<char>)
The packet type is invalid.
InvalidPacketPayload
The packet payload is invalid.
InvalidPacketLen
The packet length is invalid.
InvalidUtf8Boundary(Utf8Error)
The packet chunk is invalid
Base64Decode(DecodeError)
The base64 decoding failed.
PayloadTooLarge
The payload is too large.
Trait Implementations§
Source§impl Debug for PacketParseError
impl Debug for PacketParseError
Source§impl Display for PacketParseError
impl Display for PacketParseError
Source§impl Error for PacketParseError
impl Error for PacketParseError
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()
Source§impl From<DecodeError> for PacketParseError
impl From<DecodeError> for PacketParseError
Source§fn from(err: DecodeError) -> Self
fn from(err: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for PacketParseError
impl From<Error> for PacketParseError
Source§impl From<FromUtf8Error> for PacketParseError
impl From<FromUtf8Error> for PacketParseError
Source§fn from(err: FromUtf8Error) -> Self
fn from(err: FromUtf8Error) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for PacketParseError
impl !UnwindSafe for PacketParseError
impl Freeze for PacketParseError
impl Send for PacketParseError
impl Sync for PacketParseError
impl Unpin for PacketParseError
impl UnsafeUnpin for PacketParseError
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