Trait sai::ComponentLifecycle [−][src]
pub trait ComponentLifecycle: Send { #[must_use] fn start<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait, { ... } #[must_use] fn stop<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait, { ... } }
Expand description
ComponentLifecycle is simply start()/stop()
You will have to manually implement this trait for your component if you want to have explict startup/shutdown logic.
Check out the doc for Component trait