Struct prs_lib::tomb::Tomb [−][src]
pub struct Tomb<'a> { pub settings: TombSettings, // some fields omitted }
Expand description
Tomb helper for given store.
Fields
settings: TombSettings
Tomb settings.
Implementations
Construct new Tomb helper for given store.
Find the tomb path.
Errors if it cannot be found.
Find the tomb key path.
Errors if it cannot be found.
Open the tomb.
This will keep the tomb open until it is manually closed. See start_timer()
.
On success this may return a list with soft-fail errors.
Resize the tomb.
The Tomb must not be mounted and the size must be larger than the current.
Prepare a Tomb store for usage.
- If this store is a Tomb, the tomb is opened.
Set up a timer to automatically close password store tomb.
TODO: add support for non-systemd systems
Stop automatic close timer if any is running.
Initialize tomb.
mbs
is the size in megabytes.
The given GPG key is used to encrypt the Tomb key with.
Panics
Panics if given key is not a GPG key.
Check whether the password store is a tomb.
This guesses based on existence of some files. If this returns false you may assume this password store doesn’t use a tomb.
Check whether the password store is currently opened.
This guesses based on mount information for the password store directory.
Fetch Tomb size statistics.
This is expensive.
Auto Trait Implementations
impl<'a> RefUnwindSafe for Tomb<'a>
impl<'a> UnwindSafe for Tomb<'a>
Blanket Implementations
type Err = NoError
type Err = NoError
The error type produced by a failed conversion.
pub fn approx_from(
src: Src
) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
pub fn approx_from(
src: Src
) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
pub fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
pub fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
Mutably borrows from an owned value. Read more
Approximate the subject to a given type with the default scheme.
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Approximate the subject to a given type with a specific scheme.
Attempt to convert the subject to a given type.
type Err = NoError
type Err = NoError
The error type produced by a failed conversion.
pub fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
pub fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
Convert the given value into an exactly equivalent representation.
type Err = <Dst as ValueFrom<Src>>::Err
type Err = <Dst as ValueFrom<Src>>::Err
The error type produced by a failed conversion.
pub fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
pub fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
Convert the subject into an exactly equivalent representation.