pub trait IsolatedService: Any {
// Required methods
fn init<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Res<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn main<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Res<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn repeat<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Res<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn catch<'life0, 'async_trait>(
&'life0 mut self,
error: Error,
) -> Pin<Box<dyn Future<Output = Res<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn abort<'life0, 'async_trait>(
&'life0 mut self,
error: Error,
) -> Pin<Box<dyn Future<Output = Res<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn to_dyn(self) -> DynamicIsolatedService
where Self: Sized + Sync + Send { ... }
}Expand description
Isolated services are services that can’t be accessed from the outside. they are helpful as root services, services that hold other services.
Required Methods§
Sourcefn init<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Res<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn init<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Res<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
only runs once at the start
Sourcefn main<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Res<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn main<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Res<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
loops
Sourcefn repeat<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Res<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn repeat<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Res<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
runs after main if main or repeat did not return errors