Skip to main content

WithConfigDefault

Trait WithConfigDefault 

Source
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§

Source

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.

Implementations on Foreign Types§

Source§

impl<A, R> WithConfigDefault<A, R> for Effect<A, ConfigError, R>
where A: Clone + 'static, R: 'static,

Source§

fn with_default(self, default: A) -> Effect<A, ConfigError, R>

Implementors§