Skip to content

mapping

Structs

  • MappingRule - A validated mapping rule ready for matching.
  • MappingTable - Collection of validated, specificity-ordered mapping rules.

Enums

  • MatchResult - The result of matching a request against the mapping table.

firma_sidecar::normalizer::mapping::MappingRule

Section titled “firma_sidecar::normalizer::mapping::MappingRule”

Struct

A validated mapping rule ready for matching.

Fields:

  • method: Option<String>
  • host_pattern: String
  • path_pattern: Option<String>
  • action_class: String

firma_sidecar::normalizer::mapping::MappingTable

Section titled “firma_sidecar::normalizer::mapping::MappingTable”

Struct

Collection of validated, specificity-ordered mapping rules.

Loaded from TOML configuration at startup. Immutable after initialization.

Methods:

  • fn from_config(file: &MappingRulesFile, registry: &ActionClassRegistry, default_protected: bool) -> Result<Self, String> - Load and validate mapping rules from a parsed config.
  • fn find_match<'a>(self: &'a Self, method: &str, host: &str, path: &str) -> MatchResult<'a> - Find the first (most specific) matching rule for a request.

Trait Implementations:

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

firma_sidecar::normalizer::mapping::MatchResult

Section titled “firma_sidecar::normalizer::mapping::MatchResult”

Enum

The result of matching a request against the mapping table.

Generic Parameters:

  • ‘a

Variants:

  • Matched(&'a MappingRule) - Matched a rule — use this action class.
  • UnclassifiedProtected - No rule matched and the host is protected — deny as unclassified.
  • NotProtected - No rule matched and the host is not protected — passthrough.

Trait Implementations:

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