pub struct Config {
pub pkcs11_module: String,
pub slot_id: u64,
pub pin: Option<String>,
pub token_label: Option<String>,
}Expand description
Typed view over the PKCS#11 backend’s open-time options.
Construct with Config::from_options. All fields are owned so
the value can outlive the borrowed Options map.
Fields§
§pkcs11_module: StringFilesystem path to the PKCS#11 shared object. Required.
slot_id: u64HSM slot id. Required.
pin: Option<String>User PIN. None means the caller will prompt for it.
token_label: Option<String>Token label, used for slot discovery. None means slot id is
authoritative.
Implementations§
Source§impl Config
impl Config
Sourcepub fn from_options(opts: &Options) -> Result<Self>
pub fn from_options(opts: &Options) -> Result<Self>
Parse a Config out of an Options map.
Returns Error::Wrapped with a descriptive message when a
required option is missing or malformed. We use Wrapped
rather than adding PKCS#11-specific error variants so the
backend does not leak its config grammar into the shared
Store error enum — the Store contract is that backends surface
failures through the existing variants.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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