ConfigParentFallbackExt

Trait ConfigParentFallbackExt 

Source
pub trait ConfigParentFallbackExt {
    // Required method
    fn get_with_parent_fallback(
        &self,
        parent: &str,
        name: &str,
        key: &str,
    ) -> Option<String>;
}
Expand description

Extension trait to get values with parent table fallback.

This provides a consistent way to retrieve a value for a given logical name and fall back to the parent table when the specific name is not present.

Required Methods§

Source

fn get_with_parent_fallback( &self, parent: &str, name: &str, key: &str, ) -> Option<String>

Returns a string value for {parent}.{name}.{key} if available. Otherwise falls back to {parent}.{key} (parent table defaults).

The parent is the parent table name (e.g., “measurement”). The name is the specific identifier within that parent.

Implementations on Foreign Types§

Source§

impl ConfigParentFallbackExt for Config

Source§

fn get_with_parent_fallback( &self, parent: &str, name: &str, key: &str, ) -> Option<String>

Implementors§