Skip to main content

load_config_tree

Function load_config_tree 

Source
pub fn load_config_tree<T, E, F>(
    root_path: impl AsRef<Path>,
    load: F,
) -> Result<ConfigTree<T>>
where E: Into<BoxError>, F: FnMut(&Path) -> Result<ConfigSource<T>, E>,
Expand description

Loads a config tree with default traversal options.

§Type Parameters

  • T: Loaded value type stored for each config source.
  • E: Error type returned by load.
  • F: Source loader callback type.

§Arguments

  • root_path: Root config path to load first.
  • load: Callback that receives each normalized absolute source path and returns the source value with its declared include paths.

§Returns

Returns a ConfigTree containing loaded nodes in traversal order.