pub enum KeySource {
Keychain {
service: String,
account: String,
},
File(PathBuf),
}Expand description
Where the master key comes from.
Variants§
Keychain
The OS keychain: Keychain on macOS, Credential Manager on Windows, Secret Service (GNOME Keyring, KWallet) on Linux.
Fields
File(PathBuf)
A file holding the key, for servers and containers. Created with owner-only permissions if missing.
Implementations§
Source§impl KeySource
impl KeySource
Sourcepub fn default_keychain() -> Self
pub fn default_keychain() -> Self
The keychain item Veil uses.
Sourcepub fn load_or_create(&self) -> Result<MasterKey, Error>
pub fn load_or_create(&self) -> Result<MasterKey, Error>
Reads the key, creating and storing a new random one on first use.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeySource
impl RefUnwindSafe for KeySource
impl Send for KeySource
impl Sync for KeySource
impl Unpin for KeySource
impl UnsafeUnpin for KeySource
impl UnwindSafe for KeySource
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more