pub enum Error {
Authentication,
InvalidFormat,
BufferOverflow,
AESCounterOverflow,
Duplicate,
Corrupted,
ReservedBytesOverride,
Postcard(Error),
}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.
ReservedBytesOverride
If the flag used overrides some reserved bytes
Postcard(Error)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Error
impl<'de> Deserialize<'de> for Error
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 Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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