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
use crate::FeatureRecord;

/// Raw output of a feature load before generic deserialisation.
///
/// Used internally by [`crate::LoaderOps::load_feature_raw`] to return
/// type-erased feature data that [`crate::DefaultLoader`] then deserialises
/// into the concrete section type.
///
/// Fields are `pub` (not `pub(crate)`) because real, technology-specific
/// `LoaderOps` implementors (e.g. `configbuilder-svc-loader-spi`) construct
/// this type directly from a separate crate.
pub struct RawFeature {
    /// The raw TOML value when the feature is enabled, or `None` when disabled.
    pub value: Option<toml::Value>,
    /// Metadata record describing the feature's resolved state.
    pub record: Box<FeatureRecord>,
}