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