pub enum Keyring {
Locked(LockedKeyring),
Unlocked(UnlockedKeyring),
}Variants§
Locked(LockedKeyring)
Unlocked(UnlockedKeyring)
Implementations§
Source§impl Keyring
impl Keyring
Sourcepub async fn validate_secret(&self, secret: &Secret) -> Result<bool, Error>
pub async fn validate_secret(&self, secret: &Secret) -> Result<bool, Error>
Validate that a secret can decrypt the items in this keyring.
pub async fn validate_unencrypted(&self) -> Result<bool, Error>
Sourcepub async fn modified_time(&self) -> Duration
pub async fn modified_time(&self) -> Duration
Get the modification timestamp
Sourcepub async fn created_time(&self) -> Option<Duration>
pub async fn created_time(&self) -> Option<Duration>
Get the creation timestamp from the filesystem if the keyring has an associated file.
pub async fn items(&self) -> Result<Vec<Item>, Error>
pub const fn is_locked(&self) -> bool
pub fn as_unlocked(&self) -> &UnlockedKeyring
pub fn as_locked(&self) -> &LockedKeyring
Trait Implementations§
Source§impl From<LockedKeyring> for Keyring
impl From<LockedKeyring> for Keyring
Source§fn from(keyring: LockedKeyring) -> Self
fn from(keyring: LockedKeyring) -> Self
Converts to this type from the input type.
Source§impl From<UnlockedKeyring> for Keyring
impl From<UnlockedKeyring> for Keyring
Source§fn from(keyring: UnlockedKeyring) -> Self
fn from(keyring: UnlockedKeyring) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for Keyring
impl !RefUnwindSafe for Keyring
impl !UnwindSafe for Keyring
impl Send for Keyring
impl Sync for Keyring
impl Unpin for Keyring
impl UnsafeUnpin for Keyring
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