Skip to main content

ConfigDefaults

Trait ConfigDefaults 

Source
pub trait ConfigDefaults: Sized {
    // Required method
    fn defaults() -> Self;
}
Expand description

A trait for configuration types that can provide recommended defaults.

This trait complements ConfigValidator::get_defaults, allowing generic code to talk about defaults without depending on validation details.

Required Methods§

Source

fn defaults() -> Self

Return the recommended defaults for this configuration type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§