Enum btconfig::CredStoreConfig
source · pub enum CredStoreConfig {
File {
path: PathBuf,
},
Tpm {
path: PathBuf,
tabrmd: String,
},
}
Expand description
Configuration which specifies how to construct a [btlib::crypto::CredStore].
Variants§
File
Use a local file as a credential store.
Tpm
Fields
Use the configured TPM as a credential store.
Implementations§
source§impl CredStoreConfig
impl CredStoreConfig
sourcepub fn consume<F: CredStoreConsumer>(self, consumer: F) -> Result<F::Output>
pub fn consume<F: CredStoreConsumer>(self, consumer: F) -> Result<F::Output>
Calls consume
with the credential store created based on the configuration data in self
sourcepub fn consume_mut<F: CredStoreMutConsumer>(
self,
consumer: F
) -> Result<F::Output>
pub fn consume_mut<F: CredStoreMutConsumer>( self, consumer: F ) -> Result<F::Output>
Calls consume_mut
with the credential store created based on the configuration data in self
Trait Implementations§
source§impl Clone for CredStoreConfig
impl Clone for CredStoreConfig
source§fn clone(&self) -> CredStoreConfig
fn clone(&self) -> CredStoreConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CredStoreConfig
impl Debug for CredStoreConfig
source§impl Default for CredStoreConfig
impl Default for CredStoreConfig
source§impl<'de> Deserialize<'de> for CredStoreConfig
impl<'de> Deserialize<'de> for CredStoreConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for CredStoreConfig
impl Send for CredStoreConfig
impl Sync for CredStoreConfig
impl Unpin for CredStoreConfig
impl UnwindSafe for CredStoreConfig
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