Trait ApplicationInterface

Source
pub trait ApplicationInterface {
    type CLI: ApplicationCLIInterface;
    type ENV: ApplicationEnvInterface;

    // Required methods
    fn define_process_mode(self, mode: EnvProcessMode) -> Self
       where Self: Sized;
    fn with_cli_args(self) -> Self
       where Self: Sized;
    fn with_env_vars(self) -> Result<Self, Error>
       where Self: Sized;
    fn cli_args(&self) -> &Self::CLI;
    fn env_vars(&self) -> &Self::ENV;
}

Required Associated Types§

Required Methods§

Source

fn define_process_mode(self, mode: EnvProcessMode) -> Self
where Self: Sized,

Définit le mode d’exécution du programme.

Source

fn with_cli_args(self) -> Self
where Self: Sized,

Définit les arguments de la CLI, filtrés par les champs de la structure implémentant l’interface [CLI_Interface].

Source

fn with_env_vars(self) -> Result<Self, Error>
where Self: Sized,

Définit les variables d’environnement, filtrés par les champs de la structure implémentant l’interface [ENV_Interface].

Source

fn cli_args(&self) -> &Self::CLI

Arguments de la CLI.

Source

fn env_vars(&self) -> &Self::ENV

Variables d’environnement.

Implementors§