selection
Module: authority::selection
Section titled “Module: authority::selection”Contents
Section titled “Contents”Enums
AuthorityCli- CLI-side selection (value of--authority).AuthoritySelection- Final, resolved Authority selection.
Functions
resolve- Resolve the selection.
Constants
PROMPT_TEXT- User-visible prompt text. Spec §4 step 4 verbatim.
firma_run::authority::selection::AuthorityCli
Section titled “firma_run::authority::selection::AuthorityCli”Enum
CLI-side selection (value of --authority).
Variants:
Unset- Flag not passed.Local---authority local.Remote(String)---authority <url>.
Traits: Eq
Trait Implementations:
- Clone
fn clone(self: &Self) -> AuthorityCli
- PartialEq
fn eq(self: &Self, other: &AuthorityCli) -> bool
- Default
fn default() -> AuthorityCli
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_run::authority::selection::AuthoritySelection
Section titled “firma_run::authority::selection::AuthoritySelection”Enum
Final, resolved Authority selection.
Variants:
Local- Use a local Mini Authority on loopback with a per-run ephemeral port;Remote(String)- Use a remote Authority at the given URL.
Traits: Eq
Trait Implementations:
- Clone
fn clone(self: &Self) -> AuthoritySelection
- PartialEq
fn eq(self: &Self, other: &AuthoritySelection) -> bool
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_run::authority::selection::PROMPT_TEXT
Section titled “firma_run::authority::selection::PROMPT_TEXT”Constant: &str
User-visible prompt text. Spec §4 step 4 verbatim.
firma_run::authority::selection::resolve
Section titled “firma_run::authority::selection::resolve”Function
Resolve the selection.
Errors
Section titled “Errors”Returns:
- [
RunError::MissingAuthority] whenno_autostartis set and nothing is configured. - [
RunError::AuthorityPromptNoTty] when no config exists and stdin is not a TTY. - [
RunError::AuthorityDeclined] when the user answers N. - [
RunError::ConfigParse] /Internalon user-config I/O failure.
fn resolve(cli: &AuthorityCli, no_autostart: bool, user_config_path: &std::path::Path, prompt: & mut dyn AuthorityPromptIo) -> Result<AuthoritySelection, crate::error::RunError>