crb_runtime::runtime

Trait Runtime

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

Source

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.

Source

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>

Source§

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

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

Implementations on Foreign Types§

Source§

impl Runtime for Box<dyn Runtime>

Source§

fn get_interruptor(&mut self) -> 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§