Skip to content

schema

Structs

  • FirmaConfig - A firma.toml parsed once. Use when more than one [section] is

Functions

  • load_section - Read path and return the named [section] body as standalone TOML.

Struct

A firma.toml parsed once. Use when more than one [section] is needed from the same file (e.g. doctor reads both [authority] and [sidecar]) so the file is read and parsed a single time.

Methods:

  • fn load(path: &Path) -> anyhow::Result<Self> - Read and parse path once.
  • fn origin(self: &Self) -> &Path - Path where this config was originally loaded from.
  • fn section(self: &Self, section_path: &str) -> anyhow::Result<String> - The named section body re-serialized as standalone TOML.

Trait Implementations:

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

Function

Read path and return the named [section] body as standalone TOML.

The unified firma.toml is always sectioned. A missing [section] is a hard error (fail-closed) — there is no flat-file fallback.

Returns the read/parse error, or a “missing section” error.

fn load_section(path: &std::path::Path, section: &str) -> anyhow::Result<String>