Trait abscissa::Component [−][src]
pub trait Component: Debug + Send + Sync { fn name(&self) -> &'static str; fn version(&self) -> Version; fn dependencies(&self) -> Iter<&'static str> { ... } fn init(&mut self) -> Result<(), FrameworkError> { ... } fn shutdown(&self) -> Result<(), FrameworkError> { ... } }
Framework subcomponents. Handles framework initialization (but could be used for a lot more).
Components must implement the PartialOrd
trait, which will be used to
determine initialization order.
Required Methods
fn name(&self) -> &'static str
Name of this component
fn version(&self) -> Version
Version of this component
Provided Methods
ⓘImportant traits for Iter<'a, T>
fn dependencies(&self) -> Iter<&'static str>
Names of the components this components depends on
fn init(&mut self) -> Result<(), FrameworkError>
Initialize this component at the time the framework boots
fn shutdown(&self) -> Result<(), FrameworkError>
Shut down this component when the app shuts down
Implementors
impl Component for LoggingComponent
impl Component for ShellComponent