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§
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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".