resolver
Module: resolver
Section titled “Module: resolver”Contents
Section titled “Contents”Structs
ConfigResolveError- Resolution failure. Fail-closed; a selected config could not be loaded.ConfigResolver- A helper to determine which configuration should be applied to theFirmaConfigCandidate- A candidate.firma/location produced while walking up the directory tree.FirmaConfigCandidateAncestors- Iterator over ancestor.firma/candidates, nearest-first.ResolvedConfig- Resolved config location plus the dir to re-base defaults against.
Enums
ConfigSource- Where the resolved config came from.
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: ConfigSourcepath: std::path::PathBuf
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 walk_up_to<impl Into<PathBuf>>(self: Self, ceiling: impl Trait) -> Self- Set an upper bound for walk-up resolution.fn resolve_config(self: &Self, cli_override: Option<&Path>) -> Result<Option<ResolvedConfig>, ConfigResolveError>- Resolve and load the config file.
Trait Implementations:
- Default
fn default() -> ConfigResolver
- Clone
fn clone(self: &Self) -> 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--configflag.EnvVar-$FIRMA_CONFIGenv var pointing directly to the file.ProjectLocal- Project-local.firma/firma.tomlfound by walking up from cwd.
Traits: Copy, Eq
Trait Implementations:
- Clone
fn clone(self: &Self) -> ConfigSource
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- PartialEq
fn eq(self: &Self, other: &ConfigSource) -> bool
firma_config_loader::resolver::FirmaConfigCandidate
Section titled “firma_config_loader::resolver::FirmaConfigCandidate”Struct
A candidate .firma/ location produced while walking up the directory tree.
Yielded nearest-first by [FirmaConfigCandidateAncestors]. Discovery reads
config_file to find the winning config; the sandbox
backend masks config_dir so an agent cannot read or
poison it. Paths are constructed by joining, not stat’d — callers decide
whether each candidate exists.
Fields:
config_dir: std::path::PathBuf- The.firma/directory for this ancestor (<dir>/.firma).
Methods:
fn config_file(self: &Self) -> PathBuf- Thefirma.tomlcandidate inside this.firma/directory
Traits: Eq
Trait Implementations:
- PartialEq
fn eq(self: &Self, other: &FirmaConfigCandidate) -> bool
- Clone
fn clone(self: &Self) -> FirmaConfigCandidate
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_config_loader::resolver::FirmaConfigCandidateAncestors
Section titled “firma_config_loader::resolver::FirmaConfigCandidateAncestors”Struct
Iterator over ancestor .firma/ candidates, nearest-first.
Built via [FirmaConfigCandidateAncestors::new]. An optional inclusive ceiling stops
iteration after the ceiling directory, and yields nothing when the start path
is not within the ceiling.
Generic Parameters:
- ‘a
Methods:
fn new(start: &'a Path, ceiling: Option<&'a Path>) -> Self- Walk up fromstart, yielding each ancestor’s.firma/candidate
Trait Implementations:
- Iterator
fn next(self: & mut Self) -> Option<<Self as >::Item>
- Clone
fn clone(self: &Self) -> FirmaConfigCandidateAncestors<'a>
- 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- Thefirma.tomlthat won.fn config_dir(self: &Self) -> PathBuf- The resolved config file’s parent, used to re-base unset resource paths.
Trait Implementations:
- Clone
fn clone(self: &Self) -> ResolvedConfig
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result