pub struct PassProvider { /* private fields */ }Expand description
SecretProvider impl for password-store.
Implementations§
Source§impl PassProvider
impl PassProvider
Sourcepub fn new(runner: Arc<dyn CommandRunner>, store_dir: PathBuf) -> Self
pub fn new(runner: Arc<dyn CommandRunner>, store_dir: PathBuf) -> Self
Construct with a runner and explicit store directory. Tests
use this directly; production code uses Self::from_env.
Sourcepub fn from_env(runner: Arc<dyn CommandRunner>) -> Self
pub fn from_env(runner: Arc<dyn CommandRunner>) -> Self
Construct from environment: respects $PASSWORD_STORE_DIR,
falls back to $HOME/.password-store. If $HOME is unset
(deeply unusual; suggests a test or a daemon context),
returns a provider rooted at /.password-store — probe()
will surface Misconfigured because that path won’t exist.
Trait Implementations§
Source§impl SecretProvider for PassProvider
impl SecretProvider for PassProvider
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 PassProvider
impl !RefUnwindSafe for PassProvider
impl Send for PassProvider
impl Sync for PassProvider
impl Unpin for PassProvider
impl UnsafeUnpin for PassProvider
impl !UnwindSafe for PassProvider
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