Trait Service
Source pub trait Service:
Send
+ Sync
+ 'static {
// Required methods
fn name(&self) -> &'static str;
fn owner(&self) -> ServiceOwner;
fn run<'async_trait>(
self: Arc<Self>,
shutdown: ShutdownRx,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait;
// Provided method
fn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}