[][src]Enum securestore::KeySource

#[non_exhaustive]
pub enum KeySource<'a, P: AsRef<Path> = &'a Path> {
    File(P),
    Password(&'a str),
    Csprng,
}

Used to specify where encryption/decryption keys should be loaded from

Variants (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.
File(P)

Load the keys from a binary file on-disk

Password(&'a str)

Derive keys from the specified password

Csprng

Automatically generate new keys from a secure RNG. SecretsManager::export_keyfile() should be used to export the keys before the instance is disposed.

Auto Trait Implementations

impl<'a, P> RefUnwindSafe for KeySource<'a, P> where
    P: RefUnwindSafe

impl<'a, P> Send for KeySource<'a, P> where
    P: Send

impl<'a, P> Sync for KeySource<'a, P> where
    P: Sync

impl<'a, P> Unpin for KeySource<'a, P> where
    P: Unpin

impl<'a, P> UnwindSafe for KeySource<'a, P> where
    P: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.