pub trait WithConfigDefault<A, R>: Sized {
// Required method
fn with_default(self, default: A) -> Effect<A, ConfigError, R>;
}Expand description
Config.withDefault as a method — only ConfigError::Missing is swapped.
This is a trait-impl method so the effect! lint is not required here.
Required Methods§
Sourcefn with_default(self, default: A) -> Effect<A, ConfigError, R>
fn with_default(self, default: A) -> Effect<A, ConfigError, R>
Return default in place of the effect value when the error is ConfigError::Missing.
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.