Skip to main content

ConfigBuilder

Trait ConfigBuilder 

Source
pub trait ConfigBuilder: Builder {
    // Required method
    fn apply_defaults(&mut self) -> Result<(), ConfigBuildError>;
}
Expand description

A Builder as generated and used by our configuration system.

Required Methods§

Source

fn apply_defaults(&mut self) -> Result<(), ConfigBuildError>

Modify self by replacing any options that haven’t been set with their defaults.

Also, resolves deprecated settings: When a deprecated setting is provided, and the modern version is not, apply_defaults derives the modern value from the deprecated value, and writes it into the modern field. (If both a deprecated setting, and its modern form, are set on entry to apply_defaults, the deprecated form is ignored.)

It is not necessary to call this method if all you want to do with this builder is to call build() on it: build() also takes defaults into account.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§