#[non_exhaustive]pub enum Pkcs11Error {
Module {
module: PathBuf,
source: Error,
},
TokenNotFound(Pkcs11Token),
InvalidOptions(String),
Call {
function: &'static str,
source: Error,
},
SignatureLength {
alg: JwsAlgorithm,
expected: usize,
actual: usize,
},
}Available on crate feature
pkcs11 only.Expand description
What went wrong with the PKCS#11 module, carried as KeyStoreError::Backend.
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.
Module
The module could not be loaded or initialized.
TokenNotFound(Pkcs11Token)
No slot of the module holds the requested token.
InvalidOptions(String)
An option is not usable.
Call
A PKCS#11 function failed.
Fields
SignatureLength
The module returned a signature of another length than the algorithm’s JWS form has.
Trait Implementations§
Source§impl Debug for Pkcs11Error
impl Debug for Pkcs11Error
Source§impl Display for Pkcs11Error
impl Display for Pkcs11Error
Source§impl Error for Pkcs11Error
impl Error for Pkcs11Error
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()
Auto Trait Implementations§
impl !RefUnwindSafe for Pkcs11Error
impl !UnwindSafe for Pkcs11Error
impl Freeze for Pkcs11Error
impl Send for Pkcs11Error
impl Sync for Pkcs11Error
impl Unpin for Pkcs11Error
impl UnsafeUnpin for Pkcs11Error
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