Trait Runtime

Source
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§

Source

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.

Source

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§

Trait Implementations§

Source§

impl Runtime for Box<dyn Runtime>

Source§

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.
Source§

fn routine<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn interruption_level(&self) -> InterruptionLevel

Implementations on Foreign Types§

Source§

impl Runtime for Box<dyn Runtime>

Source§

fn get_interruptor(&mut self) -> Box<dyn Interruptor>

Source§

fn routine<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§