pub enum ErrorCode {
Show 15 variants
InvalidMessage = 1_001,
InvalidPayload = 1_002,
UnsupportedVersion = 1_003,
NoProposalChosen = 1_004,
InvalidSyntax = 1_005,
AuthenticationFailed = 2_001,
CryptoError = 2_002,
InvalidKeyLength = 2_003,
InvalidState = 3_001,
InvalidStateTransition = 3_002,
SaNotFound = 3_003,
ReplayDetected = 4_001,
NetworkError = 5_001,
NetworkTimeout = 5_002,
InternalError = 9_001,
}Expand description
Error codes for programmatic handling
Provides stable error codes that can be used for programmatic error handling, logging, and monitoring. Error codes are grouped by category (1000s = protocol, 2000s = crypto, 3000s = state, etc.)
Variants§
InvalidMessage = 1_001
Invalid message format (1001)
InvalidPayload = 1_002
Invalid payload (1002)
UnsupportedVersion = 1_003
Unsupported version (1003)
NoProposalChosen = 1_004
No proposal chosen (1004)
InvalidSyntax = 1_005
Invalid syntax (1005)
AuthenticationFailed = 2_001
Authentication failed (2001)
CryptoError = 2_002
Cryptographic operation failed (2002)
InvalidKeyLength = 2_003
Invalid key length (2003)
InvalidState = 3_001
Invalid state (3001)
InvalidStateTransition = 3_002
Invalid state transition (3002)
SaNotFound = 3_003
Security Association not found (3003)
ReplayDetected = 4_001
Replay attack detected (4001)
NetworkError = 5_001
Network I/O error (5001)
NetworkTimeout = 5_002
Network timeout (5002)
InternalError = 9_001
Internal error (9001)
Implementations§
Trait Implementations§
impl Copy for ErrorCode
impl Eq for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnsafeUnpin for ErrorCode
impl UnwindSafe for ErrorCode
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