store
Module: store
Section titled “Module: store”Contents
Section titled “Contents”Structs
ConnectionStore- The private directory that holds the connection.ReadGuard- A shared lock on the connection.WriteGuard- The exclusive lock on the connection.
firma_connection_store::store::ConnectionStore
Section titled “firma_connection_store::store::ConnectionStore”Struct
The private directory that holds the connection.
Methods:
fn open<impl Into<PathBuf>>(dir: impl Trait) -> Result<Self, StoreError>- Opensdir, creating it with mode0700(and missing parents withfn open_existing<impl Into<PathBuf>>(dir: impl Trait) -> Result<Option<Self>, StoreError>- Opens an existing private directory without creating anything.fn open_with_native_store<impl Into<PathBuf>>(dir: impl Trait, native: Arc<CredentialStore>) -> Result<Self, StoreError>- Opensdirwith the supplied credential backend. The backend is usedfn dir(self: &Self) -> &Path- The connection directory.fn shared(self: &Self) -> Result<ReadGuard, StoreError>- Waits for a shared lock: other readers may hold it at the same time,fn exclusive(self: &Self) -> Result<WriteGuard, StoreError>- Waits for the exclusive lock. Every change goes through it. Like
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Clone
fn clone(self: &Self) -> Self
firma_connection_store::store::ReadGuard
Section titled “firma_connection_store::store::ReadGuard”Struct
A shared lock on the connection.
Methods:
fn load(self: &Self) -> Result<Option<SavedConnection>, StoreError>- Reads the saved connection and its secret, orNonewhen there is
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_connection_store::store::WriteGuard
Section titled “firma_connection_store::store::WriteGuard”Struct
The exclusive lock on the connection.
Methods:
fn load(self: &Self) -> Result<Option<SavedConnection>, StoreError>- Reads the saved connection, as [ReadGuard::load].fn replace(self: &Self, connection: &Connection, secret: Option<&ConnectionSecret>, policy: SecretPolicy) -> Result<Replaced, StoreError>- Replaces the saved connection withconnectionandsecret.fn remove(self: &Self) -> Result<Removed, StoreError>- Removes the saved connection and, after that, its native credential
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result