#[repr(u8)]pub enum ErrorCode {
Success = 0,
FileNotFound = 1,
InvalidFormat = 2,
DecryptionFailed = 3,
MachineMismatch = 4,
SecretRequired = 5,
InvalidCode = 6,
CounterLocked = 7,
CounterOverflow = 8,
IoError = 9,
InvalidAlphabet = 10,
InvalidArgument = 11,
}Expand description
Error codes aligned with all promocrypt components. These are used for FFI compatibility and cross-component consistency.
Variants§
Success = 0
Operation completed successfully.
FileNotFound = 1
Binary file was not found at the specified path.
InvalidFormat = 2
File format is invalid or corrupted.
DecryptionFailed = 3
Decryption failed (wrong key or corrupted data).
MachineMismatch = 4
File is bound to a different machine.
SecretRequired = 5
Operation requires a secret key but none was provided.
InvalidCode = 6
Promotional code validation failed.
CounterLocked = 7
Counter file is locked by another process.
CounterOverflow = 8
Counter has reached its maximum value.
IoError = 9
An I/O error occurred.
InvalidAlphabet = 10
The provided alphabet is invalid.
InvalidArgument = 11
An invalid argument was provided.
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 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