#[repr(C)]
pub enum ErrorCode {
Success,
PasswordTooShort,
PasswordTooLong,
InvalidPasswordFormat,
IncompatibleOption,
NotEnoughSpace,
NullPtr,
InvalidKeyLen,
}
Expand description
Error codes used in the C interface.
C interface
The C interface uses an enum of type libreauth_pass_errno
and the members has been renamed
as follows:
Rust | C |
---|---|
Success | LIBREAUTH_PASS_SUCCESS |
PasswordTooShort | LIBREAUTH_PASS_PASSWORD_TOO_SHORT |
PasswordTooLong | LIBREAUTH_PASS_PASSWORD_TOO_LONG |
InvalidPasswordFormat | LIBREAUTH_PASS_INVALID_PASSWORD_FORMAT |
IncompatibleOption | LIBREAUTH_PASS_INCOMPATIBLE_OPTION |
NotEnoughSpace | LIBREAUTH_PASS_NOT_ENOUGH_SPACE |
NullPtr | LIBREAUTH_PASS_NULL_PTR |
InvalidKeyLen | LIBREAUTH_PASS_INVALID_KEY_LEN |
Variants§
Success
Used in C-bindings to indicate the absence of errors.
PasswordTooShort
The password is shorter than the minimal length.
PasswordTooLong
The password is longer than the maximal length.
InvalidPasswordFormat
The input does not respect the storage format.
IncompatibleOption
Some options you specified are incompatible.
NotEnoughSpace
Used in C-bindings to indicate the storage does not have enough space to store the data.
NullPtr
Used in C-bindings to indicate a NULL pointer.
InvalidKeyLen
Used in C-bindings to indicate an invalid key length.
Trait Implementations§
source§impl From<InvalidKeyLength> for ErrorCode
impl From<InvalidKeyLength> for ErrorCode
source§fn from(_error: InvalidKeyLength) -> Self
fn from(_error: InvalidKeyLength) -> Self
Converts to this type from the input type.
impl Copy for ErrorCode
Auto Trait Implementations§
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