pub struct FeatureRegistry { /* private fields */ }Expand description
Collects feature-load metadata at startup for all optional TOML sections.
Trait Implementations§
Source§impl Default for FeatureRegistry
impl Default for FeatureRegistry
Source§impl FeatureRegistryOps for FeatureRegistry
impl FeatureRegistryOps for FeatureRegistry
Source§fn on_load(&mut self, observer: impl Fn(&FeatureRecord) + 'static)
fn on_load(&mut self, observer: impl Fn(&FeatureRecord) + 'static)
Register a callback to observe loaded records.
Source§fn load<T>(
&mut self,
loader: &DefaultLoader,
) -> Result<FeatureState<T>, ConfigError>where
T: OptionalSection,
fn load<T>(
&mut self,
loader: &DefaultLoader,
) -> Result<FeatureState<T>, ConfigError>where
T: OptionalSection,
Load a feature section and record its state. Read more
Source§fn validate_dependencies(&self) -> Result<(), ConfigError>
fn validate_dependencies(&self) -> Result<(), ConfigError>
Validate that every enabled feature’s declared dependencies are enabled. Read more
Source§fn records(&self) -> &[FeatureRecord]
fn records(&self) -> &[FeatureRecord]
Borrow the recorded feature records.
Source§fn summary(&self) -> FeatureSummary
fn summary(&self) -> FeatureSummary
Build a point-in-time snapshot of the recorded features.
Auto Trait Implementations§
impl !RefUnwindSafe for FeatureRegistry
impl !Send for FeatureRegistry
impl !Sync for FeatureRegistry
impl !UnwindSafe for FeatureRegistry
impl Forget for FeatureRegistry
impl Freeze for FeatureRegistry
impl Unpin for FeatureRegistry
impl UnsafeUnpin for FeatureRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more