pub trait IntoStoreError {
// Required method
fn into_store_error(self, ctx: &str) -> Error;
}Expand description
Translate a cryptoki failure into a Store Error.
This is a trait rather than a free function so that future PKCS#11
sub-types (e.g. a session-pool wrapper) can override the mapping
without rewriting call sites. Today there is a single blanket impl
for cryptoki::error::Error.
Required Methods§
Sourcefn into_store_error(self, ctx: &str) -> Error
fn into_store_error(self, ctx: &str) -> Error
Convert into a Store Result::Err.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl IntoStoreError for Error
impl IntoStoreError for Error
Source§fn into_store_error(self, ctx: &str) -> Error
fn into_store_error(self, ctx: &str) -> Error
Map a cryptoki error. The ctx string is prepended to the
message so the caller can record where in the open/operation
flow the failure occurred (e.g. “open session”, “login”).