pub struct PassStorageAdapter { /* private fields */ }Expand description
Pass storage wrapper that keeps the in-memory credential index coherent with repository changes performed by another process while Passless is running.
The underlying pass adapter builds its index once during construction and
updates it for writes performed through that adapter. External git pull,
checkout, or direct credential-file changes bypass those update hooks. This
wrapper tracks the Git HEAD plus a cheap metadata fingerprint of fido2/*.gpg
files and recreates the underlying adapter whenever either changes.
Recreating the adapter rescans credential paths without decrypting them and
clears the decrypted credential cache, preventing stale file contents from
surviving an external update.
Implementations§
Source§impl PassStorageAdapter
impl PassStorageAdapter
pub fn new_with_options( store_path: PathBuf, path: PathBuf, gpg_backend: GpgBackend, allow_create_without_prompt: bool, ) -> Result<Self>
Trait Implementations§
Source§impl CredentialStorage for PassStorageAdapter
impl CredentialStorage for PassStorageAdapter
Source§fn read_first(&mut self, filter: CredentialFilter) -> Result<Credential>
fn read_first(&mut self, filter: CredentialFilter) -> Result<Credential>
Start a new iteration and return the first matching credential
Source§fn read_next(&mut self) -> Result<Credential>
fn read_next(&mut self) -> Result<Credential>
Continue the current iteration and return the next credential
Source§fn count_credentials(&self) -> usize
fn count_credentials(&self) -> usize
Count total number of stored credentials
Source§fn disable_user_verification(&self) -> bool
fn disable_user_verification(&self) -> bool
Check if user verification should be disabled for this backend Read more
Source§fn cleanup_expired_cache(&mut self)
fn cleanup_expired_cache(&mut self)
Cleanup expired cache entries (if caching is supported) Read more
Auto Trait Implementations§
impl Freeze for PassStorageAdapter
impl RefUnwindSafe for PassStorageAdapter
impl Send for PassStorageAdapter
impl Sync for PassStorageAdapter
impl Unpin for PassStorageAdapter
impl UnsafeUnpin for PassStorageAdapter
impl UnwindSafe for PassStorageAdapter
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