Trait tor_rtcompat::BlockOn

source ·
pub trait BlockOn: Clone + Send + Sync + 'static {
    // Required method
    fn block_on<F: Future>(&self, future: F) -> F::Output;
}
Expand description

Trait for a runtime that can block on a future.

Required Methods§

source

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

Run future until it is ready, and return its output.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl BlockOn for AsyncStd

Available on (crate features native-tls or rustls) and (crate features async-std or tokio) and crate feature async-std only.
source§

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

Implementors§

source§

impl BlockOn for AsyncStdNativeTlsRuntime

Available on (crate features native-tls or rustls) and crate feature async-std only.
source§

impl BlockOn for AsyncStdRustlsRuntime

Available on (crate features native-tls or rustls) and crate feature async-std only.
source§

impl BlockOn for PreferredRuntime

source§

impl BlockOn for TokioNativeTlsRuntime

Available on (crate features native-tls or rustls) and crate feature tokio only.
source§

impl BlockOn for TokioRustlsRuntime

Available on (crate features native-tls or rustls) and crate feature tokio only.
source§

impl<SpawnR, SleepR, CoarseTimeR, TcpR, TlsR, UdpR> BlockOn for CompoundRuntime<SpawnR, SleepR, CoarseTimeR, TcpR, TlsR, UdpR>
where SpawnR: BlockOn, SleepR: Clone + Send + Sync + 'static, CoarseTimeR: Clone + Send + Sync + 'static, TcpR: Clone + Send + Sync + 'static, TlsR: Clone + Send + Sync + 'static, UdpR: Clone + Send + Sync + 'static,