Trait ApplicationEnvInterface

Source
pub trait ApplicationEnvInterface:
    Debug
    + Clone
    + Send
    + Sync {
    // Required method
    fn setup(_: &Settings) -> Result<Self, Error>
       where Self: Sized;

    // Provided method
    fn fetch_from_file<T>(env_filepath: impl AsRef<Path>) -> Result<T, Error>
       where T: DeserializeOwned { ... }
}

Required Methods§

Source

fn setup(_: &Settings) -> Result<Self, Error>
where Self: Sized,

Provided Methods§

Source

fn fetch_from_file<T>(env_filepath: impl AsRef<Path>) -> Result<T, Error>

Récupère les variables d’environnement à partir du contenu d’un fichier et retourne une structure avec les données du contenu du fichier en guise de valeurs pour chaque champ.

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 ApplicationEnvInterface for ()

Source§

fn setup(_: &Settings) -> Result<Self, Error>
where Self: Sized,

Implementors§