pub enum Error {
Authentication,
InvalidFormat,
BufferOverflow,
AESCounterOverflow,
Duplicate,
Corrupted,
PostcardError,
}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.
PostcardError
Postcard specific error during Encryption/Decryption
Trait Implementations§
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