Struct prs_lib::store::Secret[][src]

pub struct Secret {
    pub name: String,
    pub path: PathBuf,
}

A password store secret.

Fields

name: String

Display name of the secret, relative path to the password store root.

path: PathBuf

Full path to the password store secret.

Implementations

impl Secret[src]

pub fn from(store: &Store, path: PathBuf) -> Self[src]

Construct secret at given full path from given store.

pub fn in_root(root: &Path, path: PathBuf) -> Self[src]

Construct secret at given path in the given password store root.

pub fn relative_path<'a>(
    &'a self,
    root: &'a Path
) -> Result<&'a Path, StripPrefixError>
[src]

Get relative path to this secret, root must be given.

pub fn alias_target(&self, store: &Store) -> Result<Secret>[src]

Returns pointed to secret.

If this secret is an alias, this will return the pointed to secret. If this secret is not an alias, an error will be returned.

The pointed to secret may be an alias as well.

Trait Implementations

impl Clone for Secret[src]

impl Debug for Secret[src]

Auto Trait Implementations

impl RefUnwindSafe for Secret

impl Send for Secret

impl Sync for Secret

impl Unpin for Secret

impl UnwindSafe for Secret

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where
    Scheme: ApproxScheme, 

type Err = NoError

The error type produced by a failed conversion.

impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
    Dst: ApproxFrom<Src, Scheme>,
    Scheme: ApproxScheme, 

type Err = <Dst as ApproxFrom<Src, Scheme>>::Err

The error type produced by a failed conversion.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, Dst> ConvAsUtil<Dst> for T

impl<T> ConvUtil for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<Src> TryFrom<Src> for Src

type Err = NoError

The error type produced by a failed conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<Src, Dst> TryInto<Dst> for Src where
    Dst: TryFrom<Src>, 

type Err = <Dst as TryFrom<Src>>::Err

The error type produced by a failed conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<Src> ValueFrom<Src> for Src

type Err = NoError

The error type produced by a failed conversion.

impl<Src, Dst> ValueInto<Dst> for Src where
    Dst: ValueFrom<Src>, 

type Err = <Dst as ValueFrom<Src>>::Err

The error type produced by a failed conversion.