Skip to main content

ModrpcExecutor

Trait ModrpcExecutor 

Source
pub trait ModrpcExecutor {
    type Sleep: Future<Output = ()> + 'static;
    type Interval: Interval + 'static;
    type Sleeper: Sleeper + 'static;

    // Required methods
    fn new() -> Self;
    fn spawner(&mut self) -> LocalSpawner;
    fn run_until<R>(&mut self, future: impl Future<Output = R>) -> R;
    fn sleep(duration: Duration) -> Self::Sleep;
    fn interval(period: Duration) -> Self::Interval;
    fn new_sleeper() -> Self::Sleeper;
}

Required Associated Types§

Source

type Sleep: Future<Output = ()> + 'static

Source

type Interval: Interval + 'static

Source

type Sleeper: Sleeper + 'static

Required Methods§

Source

fn new() -> Self

Source

fn spawner(&mut self) -> LocalSpawner

Source

fn run_until<R>(&mut self, future: impl Future<Output = R>) -> R

Source

fn sleep(duration: Duration) -> Self::Sleep

Source

fn interval(period: Duration) -> Self::Interval

Source

fn new_sleeper() -> Self::Sleeper

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§