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) -> Selfwhere Self: Sized,

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

source

fn with_cli_args(self) -> Selfwhere 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§

source§

impl<UE, UC, US> ApplicationExt for DefaultApplication<UE, UC, US>where UE: ApplicationEnvInterface, UC: ApplicationCLIInterface,

§

type CLI = UC

§

type ENV = UE