pub struct Store {
pub root: PathBuf,
}
Expand description
Represents a password store.
Fields§
§root: PathBuf
Root directory of the password store.
This path is always absolute.
Implementations§
source§impl Store
impl Store
sourcepub fn recipients(&self) -> Result<Recipients>
pub fn recipients(&self) -> Result<Recipients>
Get the recipient keys for this store.
sourcepub fn tomb(&self, quiet: bool, verbose: bool, force: bool) -> Tomb<'_>
pub fn tomb(&self, quiet: bool, verbose: bool, force: bool) -> Tomb<'_>
Get a tomb helper for this store.
sourcepub fn secret_iter(&self) -> SecretIter ⓘ
pub fn secret_iter(&self) -> SecretIter ⓘ
Create secret iterator for this store.
sourcepub fn secret_iter_config(&self, config: SecretIterConfig) -> SecretIter ⓘ
pub fn secret_iter_config(&self, config: SecretIterConfig) -> SecretIter ⓘ
Create secret iterator for this store with custom configuration.
sourcepub fn find(&self, query: Option<String>) -> FindSecret
pub fn find(&self, query: Option<String>) -> FindSecret
Try to find matching secrets for given query.
If secret is found at exact query path, FindSecret::Found
is returned.
Otherwise any number of closely matching secrets is returned as FindSecret::Many
.
sourcepub fn normalize_secret_path<P: AsRef<Path>>(
&self,
target: P,
name_hint: Option<&str>,
create_dirs: bool
) -> Result<PathBuf>
pub fn normalize_secret_path<P: AsRef<Path>>( &self, target: P, name_hint: Option<&str>, create_dirs: bool ) -> Result<PathBuf>
Normalizes a path for a secret in this store.
- Ensures path is within store.
- If directory is given, name hint is appended.
- Sets correct extension.
- Creates parent directories if non existant (optional).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Store
impl RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnwindSafe for Store
Blanket Implementations§
source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
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
source§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Approximate the subject to a given type with the default scheme.
source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
Approximate the subject to a given type with a specific scheme.