1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! YAML configuration loader backed by `rust-config-tree` format handling.
//!
//! This module keeps parsing and validation centralized so runtime modules never
//! invent local defaults. The root file format is auto-detected by
//! `rust-config-tree` — no hard-coded format check is needed.
use crateSupervisorConfig;
use crateConfigState;
use crateSupervisorError;
use load_config;
use Path;
/// Loads validated supervisor configuration from a YAML file,
/// resolving `include` directives via `rust-config-tree`.
///
/// # Arguments
///
/// - `path`: Path to the root configuration file.
///
/// # Returns
///
/// Returns a validated [`ConfigState`] when the file is readable and complete.
///
/// # Examples
///
/// ```no_run
/// let state = rust_supervisor::config::loader::load_config_from_yaml_file(
/// "examples/config/supervisor.yaml",
/// );
/// assert!(state.is_ok());
/// ```