pub trait Runtime: Send + 'static {
// Required methods
fn get_interruptor(&mut self) -> Interruptor;
fn routine<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A runtime that can be executed by a supervisor.
Required Methods§
Sourcefn get_interruptor(&mut self) -> Interruptor
fn get_interruptor(&mut self) -> Interruptor
Used by a lifetime tracker of the supervisor to stop it. It’s the separate type that wraps address made by a runtime.
fn routine<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Trait Implementations§
Source§impl Runtime for Box<dyn Runtime>
impl Runtime for Box<dyn Runtime>
Source§fn get_interruptor(&mut self) -> Interruptor
fn get_interruptor(&mut self) -> Interruptor
Used by a lifetime tracker of the supervisor to stop it.
It’s the separate type that wraps address made by a runtime.