#[repr(C)]
pub enum ErrorCode {
Success,
NullPtr,
NotEnoughSpace,
InvalidBaseLen,
InvalidKeyLen,
CodeTooSmall,
CodeTooBig,
InvalidKey,
InvalidPeriod,
InvalidUTF8,
}Expand description
Error codes used both in the rust and C interfaces.
C interface
The C interface uses an enum of type libreauth_oath_errno and the
members has been renamed as follows:
| Rust | C |
|---|---|
| Success | LIBREAUTH_OATH_SUCCESS |
| NullPtr | LIBREAUTH_OATH_NULL_PTR |
| NotEnoughSpace | LIBREAUTH_OATH_NOT_ENOUGH_SPACE |
| InvalidBaseLen | LIBREAUTH_OATH_INVALID_BASE_LEN |
| InvalidKeyLen | LIBREAUTH_OATH_INVALID_KEY_LEN |
| CodeTooSmall | LIBREAUTH_OATH_CODE_TOO_SMALL |
| CodeTooBig | LIBREAUTH_OATH_CODE_TOO_BIG |
| InvalidKey | LIBREAUTH_OATH_INVALID_KEY |
| InvalidPeriod | LIBREAUTH_OATH_INVALID_PERIOD |
| InvalidUTF8 | LIBREAUTH_OATH_INVALID_UTF8 |
Variants
Success
NullPtr
NotEnoughSpace
InvalidBaseLen
InvalidKeyLen
CodeTooSmall
CodeTooBig
InvalidKey
InvalidPeriod
InvalidUTF8
Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more