Trait hickory_proto::Executor

source ·
pub trait Executor {
    // Required methods
    fn new() -> Self;
    fn block_on<F: Future>(&mut self, future: F) -> F::Output;
}
Expand description

Generic executor.

Required Methods§

source

fn new() -> Self

Create the implementor itself.

source

fn block_on<F: Future>(&mut self, future: F) -> F::Output

Spawns a future object to run synchronously or asynchronously depending on the specific executor.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Executor for Runtime

Available on crate feature tokio-runtime only.
source§

fn new() -> Self

source§

fn block_on<F: Future>(&mut self, future: F) -> F::Output

Implementors§