[][src]Struct tmkms::application::KmsApplication

pub struct KmsApplication { /* fields omitted */ }

The tmkms application

Trait Implementations

impl Default for KmsApplication[src]

impl Debug for KmsApplication[src]

impl Application for KmsApplication[src]

type Cmd = KmsCommand

Entrypoint command for this application.

type Cfg = KmsConfig

Application configuration.

type Paths = StandardPaths

Paths to resources within the application.

fn config(&self) -> Option<&KmsConfig>[src]

Accessor for application configuration.

fn state(&self) -> &State<Self>[src]

Borrow the application state immutably.

fn state_mut(&mut self) -> &mut State<Self>[src]

Borrow the application state mutably.

fn register_components(
    &mut self,
    command: &Self::Cmd
) -> Result<(), FrameworkError>
[src]

Register all components used by this application.

If you would like to add additional components to your application beyond the default ones provided by the framework, this is the place to do so.

fn after_config(
    &mut self,
    config: Option<Self::Cfg>
) -> Result<(), FrameworkError>
[src]

Post-configuration lifecycle callback.

Called regardless of whether config is loaded to indicate this is the time in app lifecycle when configuration would be loaded if possible.

fn logging_config(&self, command: &KmsCommand) -> Config[src]

Get logging configuration from command-line options

fn run<I>(app_lock: &'static Lock<Self>, args: I) where
    I: IntoIterator<Item = String>, 
[src]

Run application with the given command-line arguments and running the appropriate Command type. Read more

fn init(&mut self, command: &Self::Cmd) -> Result<(), Error<FrameworkErrorKind>>[src]

Load this application's configuration and initialize its components.

fn framework_components(
    &mut self,
    command: &Self::Cmd
) -> Result<Vec<Box<dyn Component<Self> + 'static>>, Error<FrameworkErrorKind>>
[src]

Initialize the framework's default set of components, potentially sourcing terminal and logging options from command line arguments. Read more

fn load_config(
    &mut self,
    command: &Self::Cmd
) -> Result<Self::Cfg, Error<FrameworkErrorKind>>
[src]

Load configuration from command's config_path(). Read more

fn name(&self) -> &'static str[src]

Name of this application as a string.

fn description(&self) -> &'static str[src]

Description of this application.

fn version(&self) -> Version[src]

Version of this application.

fn authors(&self) -> Vec<String>[src]

Authors of this application.

fn term_colors(&self, command: &Self::Cmd) -> ColorChoice[src]

Color configuration for this application.

fn handle_signal(
    &mut self,
    signal: Signal
) -> Result<(), Error<FrameworkErrorKind>>
[src]

Handle a Unix signal received by this application

fn shutdown(&mut self, shutdown: Shutdown) -> ![src]

Shut down this application gracefully, exiting with success.

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> InitializableFromZeroed for T where
    T: Default