pub enum PacketError {
InvalidPacket(String),
InvalidPacketLength(u16),
InvalidOpcode(String),
}
Expand description
The error type for the tftp packet
Variants§
InvalidPacket(String)
General errors with an error message
InvalidPacketLength(u16)
Invalid packet length with the expected length as field
InvalidOpcode(String)
Invalid Opcode with an error message
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()
Source§impl PartialEq for PacketError
impl PartialEq for PacketError
impl StructuralPartialEq for PacketError
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