Trait abscissa::Application[][src]

pub trait Application: Send + Sized + Sync {
    type Cmd: Command + LoadConfig<Self::Config>;
    type Config: GlobalConfig;
    fn config(&self) -> ConfigReader<Self::Config> { ... }
fn name(&self) -> &'static str { ... }
fn description(&self) -> &'static str { ... }
fn version(&self) -> Version { ... }
fn authors(&self) -> Vec<String> { ... }
fn bin(&self) -> CanonicalPathBuf { ... }
fn color_config(&self, command: &Self::Cmd) -> ColorConfig { ... }
fn init(&self, command: &Self::Cmd) -> Result<Components, FrameworkError> { ... }
fn components(
        &self,
        command: &Self::Cmd
    ) -> Result<Components, FrameworkError> { ... }
fn logging_config(&self, command: &Self::Cmd) -> LoggingConfig { ... }
fn path(
        &self,
        path_type: ApplicationPath
    ) -> Result<CanonicalPathBuf, FrameworkError> { ... }
fn register(&self, component: &Component) -> Result<(), FrameworkError> { ... }
fn unregister(&self, component: &Component) -> Result<(), FrameworkError> { ... }
fn shutdown(&self, components: Components) -> ! { ... } }

Core Abscissa trait used for managing the application lifecycle.

The Application trait ties together the GlobalConfig, Options, and Error types for a particular application.

It provides the main framework entrypoint: Application::boot(), which will parse command line options and launch a given application.

Associated Types

Application (sub)command which serves as the main entry point

Configuration type used by this application

Provided Methods

Get a read lock on the application's global configuration

Name of this application as a string

Description of this application

Version of this application

Important traits for Vec<u8>

Authors of this application

Path to this application's binary

Color configuration for this application

Load this application's configuration and initialize its components

Get this application's components

Get the logging configuration for this application

Get a path associated with this application

Register a componen\t with this application. By default do nothing.

Register a component with this application. By default do nothing.

Shut down this application gracefully, exiting with success

Implementors