model
Module: model
Section titled “Module: model”Contents
Section titled “Contents”Structs
Connection- Where afirma loginconnection points and which Membership it acts as.ConnectionSecret- The one opaque secret kept with a connection. Never formatted.Replaced- The outcome of a committed replacement.SavedConnection- A connection read back from disk.
Enums
Backend- Where the secret of a saved connection lives.Durability- Whether a committed change is known to survive a crash.LoadedSecret- The secret of a loaded connection, with where it was read from.OriginMode- How the saved origin was validated at login; callers re-validate theRemoved- The outcome of a removal.SecretPolicy- Where a new secret may be stored.
firma_connection_store::model::Backend
Section titled “firma_connection_store::model::Backend”Enum
Where the secret of a saved connection lives.
Variants:
None- The connection has no secret.Native- The operating system credential store.File- The connection file itself (Unix only, after an explicit opt-in).
Traits: Eq, Copy
Trait Implementations:
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
- Clone
fn clone(self: &Self) -> Self
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_connection_store::model::Connection
Section titled “firma_connection_store::model::Connection”Struct
Where a firma login connection points and which Membership it acts as.
Fields:
origin: url::Url- The Control Plane origin, as validated by the login that saved it.origin_mode: OriginMode- How the origin was validated.workspace_id: firma_identifiers::WorkspaceId- The approved Workspace.membership_id: firma_identifiers::MembershipId- The user’s Membership in that Workspace.
Traits: Eq
Trait Implementations:
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Clone
fn clone(self: &Self) -> Self
firma_connection_store::model::ConnectionSecret
Section titled “firma_connection_store::model::ConnectionSecret”Struct
The one opaque secret kept with a connection. Never formatted.
Tuple Struct: ()
Methods:
fn new(secret: SecretString) -> Self- Wraps a secret.fn as_secret(self: &Self) -> &SecretString- Returns the wrapped secret without exposing its text.fn expose(self: &Self) -> &str- Returns the secret text.
Trait Implementations:
- Debug
fn fmt(self: &Self, formatter: & mut fmt::Formatter) -> fmt::Result
firma_connection_store::model::Durability
Section titled “firma_connection_store::model::Durability”Enum
Whether a committed change is known to survive a crash.
Variants:
Durable- The directory entries in the connection path were flushed.Uncertain- The change is visible but a directory entry was not flushed
Traits: Eq, Copy
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
- Clone
fn clone(self: &Self) -> Self
firma_connection_store::model::LoadedSecret
Section titled “firma_connection_store::model::LoadedSecret”Enum
The secret of a loaded connection, with where it was read from.
Variants:
None- The connection has no secret.Native(ConnectionSecret)- Read from the operating system credential store.File(ConnectionSecret)- Read from the connection file.
Methods:
fn secret(self: &Self) -> Option<&ConnectionSecret>- The secret, when there is one.fn backend(self: &Self) -> Backend- Where the secret was read from.
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_connection_store::model::OriginMode
Section titled “firma_connection_store::model::OriginMode”Enum
How the saved origin was validated at login; callers re-validate the origin in the same mode after loading it.
Variants:
Production- HTTPS origins only.DevelopmentLoopback- Alsohttpon a loopback address, for local development.
Traits: Eq, Copy
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Clone
fn clone(self: &Self) -> Self
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
firma_connection_store::model::Removed
Section titled “firma_connection_store::model::Removed”Enum
The outcome of a removal.
Variants:
Nothing- There was no saved connection.Existing{ durability: Durability, stale_secret_left: bool }- The saved connection was removed.
Traits: Eq, Copy
Trait Implementations:
- Clone
fn clone(self: &Self) -> Self
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
firma_connection_store::model::Replaced
Section titled “firma_connection_store::model::Replaced”Struct
The outcome of a committed replacement.
Fields:
backend: Backend- Where the new secret was stored.durability: Durability- Whether the replacement is known to survive a crash.stale_secret_left: bool- A superseded native secret may remain because deletion failed or the
Traits: Eq, Copy
Trait Implementations:
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
- Clone
fn clone(self: &Self) -> Self
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_connection_store::model::SavedConnection
Section titled “firma_connection_store::model::SavedConnection”Struct
A connection read back from disk.
Fields:
connection: Connection- The connection.secret: LoadedSecret- Its secret.
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_connection_store::model::SecretPolicy
Section titled “firma_connection_store::model::SecretPolicy”Enum
Where a new secret may be stored.
Variants:
NativeOnly- Only the operating system credential store.AllowPlaintextFile- The credential store, or, when it is unavailable and only on Unix, a
Traits: Eq, Copy
Trait Implementations:
- Clone
fn clone(self: &Self) -> Self
- Default
fn default() -> Self
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- PartialEq
fn eq(self: &Self, other: &Self) -> bool