pub trait Settings {
// Required method
fn bind<C>(&mut self, config: C)
where C: Configuration;
// Provided method
fn get<C>(config: C) -> Self
where C: Configuration,
Self: Default { ... }
}
Expand description
Settings struct that can be bound by configuration.
Required Methods§
Sourcefn bind<C>(&mut self, config: C)where
C: Configuration,
fn bind<C>(&mut self, config: C)where
C: Configuration,
Bind values in self from configuration.
Provided Methods§
Sourcefn get<C>(config: C) -> Selfwhere
C: Configuration,
Self: Default,
fn get<C>(config: C) -> Selfwhere
C: Configuration,
Self: Default,
Get a new settings value from configuration.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.