Trait HasExecutor

Source
pub trait HasExecutor {
    type Executor: Executor + RunsTransport<Self>;

    // Required method
    fn executor(&self) -> Self::Executor;
}
Expand description

A transport which has an executor to spawn on.

Choosing an executor is optional and only enables some more convenient spawning APIs.

Required Associated Types§

Source

type Executor: Executor + RunsTransport<Self>

The executor to spawn on. It must be able to run this transport.

Required Methods§

Source

fn executor(&self) -> Self::Executor

Returns a reference to the executor for this transport.

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.

Implementations on Foreign Types§

Source§

impl HasExecutor for Channel

Implementors§