crb_runtime::runtime

Trait StandaloneRuntime

Source
pub trait StandaloneRuntime<T> {
    // Required methods
    fn new(input: T, label: Label) -> Self;
    fn run<'async_trait>(
        self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait;
}
Expand description

A runtime that can be executed as a standalone activity.

Required Methods§

Source

fn new(input: T, label: Label) -> Self

Returns a runtime that has to be used in an async context.

Source

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

Run routine in place.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§