Skip to content

selection

Enums

Functions

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.

Function

Resolve the selection.

Returns:

  • [RunError::MissingAuthority] when no_autostart is 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] / Internal on 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>