pub trait Configurable<E: Env> {
type Config: Clone + DeserializeOwned;
// Required method
fn build(config: Self::Config) -> Self;
// Provided method
fn build_from_path(path: impl AsRef<Path>) -> Result<Self>
where Self: Sized { ... }
}
Expand description
A configurable object, having type parameter.
Required Associated Types§
Sourcetype Config: Clone + DeserializeOwned
type Config: Clone + DeserializeOwned
Configuration.
Required Methods§
Provided Methods§
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.