Skip to content

resolver

Structs

  • ConfigResolveError - Resolution failure. Fail-closed; a selected config could not be loaded.
  • ConfigResolver - A helper to determine which configuration should be applied to the
  • ResolvedConfig - Resolved config location plus the dir to re-base defaults against.

Enums


firma_config_loader::resolver::ConfigResolveError

Section titled “firma_config_loader::resolver::ConfigResolveError”

Struct

Resolution failure. Fail-closed; a selected config could not be loaded.

Fields:

  • config_source: ConfigSource
  • path: std::path::PathBuf
  • reason: anyhow::Error

Trait Implementations:

  • Display
    • fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result
  • Error
    • fn source(self: &Self) -> ::core::option::Option<&dyn ::thiserror::__private18::Error>
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result

firma_config_loader::resolver::ConfigResolver

Section titled “firma_config_loader::resolver::ConfigResolver”

Struct

A helper to determine which configuration should be applied to the firma command that’s about to execute.

Refer to [ConfigResolver::resolve_config] for more details.

Methods:

  • fn new() -> Self - Create a new [ConfigResolver].
  • fn resolve_config(self: &Self, cli_override: Option<&Path>) -> Result<Option<ResolvedConfig>, ConfigResolveError> - Resolve and load the config file.

Trait Implementations:

  • Clone
    • fn clone(self: &Self) -> ConfigResolver
  • Default
    • fn default() -> ConfigResolver
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result

firma_config_loader::resolver::ConfigSource

Section titled “firma_config_loader::resolver::ConfigSource”

Enum

Where the resolved config came from.

Variants:

  • Flag - Explicit --config flag.
  • EnvVar - $FIRMA_CONFIG env var pointing directly to the file.
  • ProjectLocal - Project-local .firma/firma.toml found by walking up from cwd.

Traits: Eq, Copy

Trait Implementations:

  • PartialEq
    • fn eq(self: &Self, other: &ConfigSource) -> bool
  • Clone
    • fn clone(self: &Self) -> ConfigSource
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result

firma_config_loader::resolver::ResolvedConfig

Section titled “firma_config_loader::resolver::ResolvedConfig”

Struct

Resolved config location plus the dir to re-base defaults against.

Fields:

  • source: ConfigSource - Provenance, for startup logs.
  • config: crate::FirmaConfig - Config content loaded during resolution.

Methods:

  • fn config_file(self: &Self) -> &Path - The firma.toml that won.
  • fn config_dir(self: &Self) -> PathBuf - The resolved config file’s parent, used to re-base unset resource paths.

Trait Implementations:

  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
  • Clone
    • fn clone(self: &Self) -> ResolvedConfig