RuntimeProvider

Trait RuntimeProvider 

Source
pub trait RuntimeProvider: Clone + 'static {
    type Handle: Clone + Send + Spawn + Sync + Unpin;
    type Timer: Time + Send + Unpin;
    type Udp: UdpSocket + Send;
    type Tcp: Connect;
}
Expand description

RuntimeProvider defines which async runtime that handles IO and timers.

Required Associated Types§

Source

type Handle: Clone + Send + Spawn + Sync + Unpin

Handle to the executor;

Source

type Timer: Time + Send + Unpin

Timer

Source

type Udp: UdpSocket + Send

UdpSocket

Source

type Tcp: Connect

TcpStream

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§