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§
Provided Methods§
Sourcefn fetch_from_file<T>(env_filepath: impl AsRef<Path>) -> Result<T, Error>where
T: DeserializeOwned,
fn fetch_from_file<T>(env_filepath: impl AsRef<Path>) -> Result<T, Error>where
T: DeserializeOwned,
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.