configbuilder-pattern-loader 0.1.0

configbuilder-pattern: loader domain, trait contract + tech-agnostic reference implementation.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/// Controls what the feature registry does when [`OptionalSection::validate_enabled`]
/// returns an error for an otherwise-enabled section.
///
/// [`OptionalSection::validate_enabled`]: crate::OptionalSection::validate_enabled
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub enum OnError {
    /// Propagate the error -- startup halts immediately. This is the default.
    #[default]
    Fail,

    /// Treat the feature as disabled and continue startup.
    ///
    /// The validation error reason is recorded in [`crate::FeatureRecord::override_source`]
    /// as [`crate::OverrideSource::ValidationError`] so operators can inspect it in the
    /// startup summary without crashing the service.
    Disable,
}