Trait blockz::configuration::Configuration[][src]

pub trait Configuration {
    type Opts: Send;
    type Result: Send;
#[must_use]    fn load<'async_trait>(
        opts: Self::Opts
    ) -> Pin<Box<dyn Future<Output = Self::Result> + Send + 'async_trait>>
    where
        Self: 'async_trait
; }
This is supported on crate feature configuration only.

Common behaviour of configurations.

Associated Types

type Opts: Send[src]

The type of options container this Configuration accepts for the purpose of loading the configuration.

type Result: Send[src]

The result type that can be produced by loading the configuration.

Loading content...

Required methods

#[must_use]fn load<'async_trait>(
    opts: Self::Opts
) -> Pin<Box<dyn Future<Output = Self::Result> + Send + 'async_trait>> where
    Self: 'async_trait, 
[src]

Load the configuration.

Loading content...

Implementors

impl<T> Configuration for DirectConfiguration<T> where
    T: Send
[src]

type Opts = T

type Result = T

impl<T> Configuration for EnvConfiguration<T> where
    T: for<'de> Deserialize<'de> + Send
[src]

This is supported on crate feature env_configuration only.

type Opts = Option<String>

type Result = Result<T, Error>

Loading content...