pub struct Store { /* private fields */ }Expand description
The passphrases an agent is holding.
Expiry is by idle time rather than by age: a repository in active use should not start prompting again in the middle of the work it is being used for.
Implementations§
Source§impl Store
impl Store
pub fn new(idle_timeout: Duration) -> Self
pub fn put(&mut self, repo: String, passphrase: String)
Sourcepub fn get(&mut self, repo: &str) -> Option<Zeroizing<String>>
pub fn get(&mut self, repo: &str) -> Option<Zeroizing<String>>
Fetch and refresh, dropping the entry if it has gone stale.
pub fn drop_one(&mut self, repo: &str)
pub fn drop_all(&mut self)
pub fn len(&mut self) -> usize
pub fn is_empty(&mut self) -> bool
Auto Trait Implementations§
impl Freeze for Store
impl RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnsafeUnpin for Store
impl UnwindSafe for Store
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