pub struct AcquireOptions { /* private fields */ }
Expand description
A builder for CryptProv
s.
Implementations§
Source§impl AcquireOptions
impl AcquireOptions
Sourcepub fn new() -> AcquireOptions
pub fn new() -> AcquireOptions
Returns a new builder with default settings.
Sourcepub fn container(&mut self, container: &str) -> &mut AcquireOptions
pub fn container(&mut self, container: &str) -> &mut AcquireOptions
Sets the name for this key container.
This should not be set if verify_context
is set.
Sourcepub fn provider(&mut self, provider: &str) -> &mut AcquireOptions
pub fn provider(&mut self, provider: &str) -> &mut AcquireOptions
Sets the name of the CSP to be used.
Sourcepub fn verify_context(&mut self, verify_context: bool) -> &mut AcquireOptions
pub fn verify_context(&mut self, verify_context: bool) -> &mut AcquireOptions
If set, private keys will not be accessible or persisted.
Sourcepub fn new_keyset(&mut self, new_keyset: bool) -> &mut AcquireOptions
pub fn new_keyset(&mut self, new_keyset: bool) -> &mut AcquireOptions
If set, the container will be created.
Sourcepub fn machine_keyset(&mut self, machine_keyset: bool) -> &mut AcquireOptions
pub fn machine_keyset(&mut self, machine_keyset: bool) -> &mut AcquireOptions
If set, the container will be stored as a machine rather than user keys.
Sourcepub fn silent(&mut self, silent: bool) -> &mut AcquireOptions
pub fn silent(&mut self, silent: bool) -> &mut AcquireOptions
If set, an error will be returned if user intervention is required rather than displaying a dialog.
Sourcepub fn acquire(&self, type_: ProviderType) -> Result<CryptProv>
pub fn acquire(&self, type_: ProviderType) -> Result<CryptProv>
Acquires a container.
Trait Implementations§
Source§impl Default for AcquireOptions
impl Default for AcquireOptions
Source§fn default() -> AcquireOptions
fn default() -> AcquireOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AcquireOptions
impl RefUnwindSafe for AcquireOptions
impl Send for AcquireOptions
impl Sync for AcquireOptions
impl Unpin for AcquireOptions
impl UnwindSafe for AcquireOptions
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