#[non_exhaustive]pub enum TokenkeyError {
ModuleLoad {
path: PathBuf,
source: Error,
},
Pkcs11 {
call: &'static str,
source: Error,
},
IncorrectPin,
PinLocked,
NotFound(String),
Ambiguous(String),
Unsupported(String),
Certificate(String),
Poisoned,
}Expand description
An error from a tokenkey operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ModuleLoad
A PKCS#11 module could not be loaded from path.
Fields
Pkcs11
A PKCS#11 C function failed.
IncorrectPin
The PIN was incorrect (CKR_PIN_INCORRECT).
PinLocked
The PIN is locked (CKR_PIN_LOCKED).
NotFound(String)
A lookup found no matching object.
Ambiguous(String)
A lookup matched more than one object.
Unsupported(String)
The token or key cannot satisfy the request.
Certificate(String)
A certificate could not be parsed.
Poisoned
The session mutex was poisoned by a panic in another thread.
Trait Implementations§
Source§impl Debug for TokenkeyError
impl Debug for TokenkeyError
Source§impl Display for TokenkeyError
impl Display for TokenkeyError
Source§impl Error for TokenkeyError
impl Error for TokenkeyError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<TokenkeyError> for EstEidError
impl From<TokenkeyError> for EstEidError
Source§fn from(source: TokenkeyError) -> EstEidError
fn from(source: TokenkeyError) -> EstEidError
Converts to this type from the input type.
Source§impl From<TokenkeyError> for WebEidError
impl From<TokenkeyError> for WebEidError
Source§fn from(source: TokenkeyError) -> Self
fn from(source: TokenkeyError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for TokenkeyError
impl !UnwindSafe for TokenkeyError
impl Freeze for TokenkeyError
impl Send for TokenkeyError
impl Sync for TokenkeyError
impl Unpin for TokenkeyError
impl UnsafeUnpin for TokenkeyError
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