pub struct KeychainProvider { /* private fields */ }Expand description
SecretProvider impl for the macOS Keychain via the
security command. Holds a CommandRunner for subprocess
invocations; tests substitute a ScriptedRunner to mock
security without touching the real keychain.
Implementations§
Source§impl KeychainProvider
impl KeychainProvider
pub fn new(runner: Arc<dyn CommandRunner>) -> Self
pub fn from_env(runner: Arc<dyn CommandRunner>) -> Self
Trait Implementations§
Source§impl SecretProvider for KeychainProvider
impl SecretProvider for KeychainProvider
Source§fn scheme(&self) -> &str
fn scheme(&self) -> &str
The URI scheme this provider claims, without the colon.
"op" for 1Password (op://...), "pass" for password-store
(pass:path/to/secret), "sops" for SOPS, etc. The scheme
registry uses this to dispatch references to the right
provider.Source§fn probe(&self) -> ProbeResult
fn probe(&self) -> ProbeResult
Cheap, side-effect-free check: can this provider service
resolve() calls right now? Returns the actionable outcome;
see ProbeResult variants. Read moreAuto Trait Implementations§
impl Freeze for KeychainProvider
impl !RefUnwindSafe for KeychainProvider
impl Send for KeychainProvider
impl Sync for KeychainProvider
impl Unpin for KeychainProvider
impl UnsafeUnpin for KeychainProvider
impl !UnwindSafe for KeychainProvider
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