pub enum PacketError {
InvaidContent {
t: Opcode,
},
BadContent {
t: Opcode,
},
}
Variants§
InvaidContent
Tried to put content in a packet that does not support it.
For example, called Packet::content(content)
on a Opcode::Ping
packet
BadContent
Packet content is too long
For example, called Packet::content(content)
on a String with a length greater than 1003
Trait Implementations§
Source§impl Debug for PacketError
impl Debug for PacketError
Source§impl Display for PacketError
impl Display for PacketError
Source§impl Error for PacketError
impl Error for PacketError
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 PacketError
impl RefUnwindSafe for PacketError
impl Send for PacketError
impl Sync for PacketError
impl Unpin for PacketError
impl UnwindSafe for PacketError
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