pub enum PacketError {
Authentication,
InvalidFormat,
BufferOverflow,
AESCounterOverflow,
Duplicate,
Corrupted,
}Expand description
Errors that can occur during packet construction, serialization, or decryption.
Variants§
Authentication
Cryptographic verification failed (tampered payload or invalid key).
InvalidFormat
The packet does not match the expected structure or is too small.
BufferOverflow
Postcard serialization exceeded the internal packet buffers.
AESCounterOverflow
The 5-byte AES counter exceeded its maximum value ($2^{40} - 1$).
Duplicate
Received a packet with a duplicate or older nonce (replay attack protection).
Corrupted
General payload corruption.
Trait Implementations§
Source§impl Clone for PacketError
impl Clone for PacketError
Source§fn clone(&self) -> PacketError
fn clone(&self) -> PacketError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PacketError
Source§impl Debug for PacketError
impl Debug for PacketError
Source§impl<'de> Deserialize<'de> for PacketError
impl<'de> Deserialize<'de> for PacketError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PacketError
Source§impl PartialEq for PacketError
impl PartialEq for PacketError
Source§fn eq(&self, other: &PacketError) -> bool
fn eq(&self, other: &PacketError) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PacketError
impl Serialize 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 UnsafeUnpin 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