tor_rtcompat

Trait 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.

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 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, UnixR, TlsR, UdpR> BlockOn for CompoundRuntime<SpawnR, SleepR, CoarseTimeR, TcpR, UnixR, TlsR, UdpR>
where SpawnR: BlockOn, SleepR: Clone + Send + Sync + 'static, CoarseTimeR: Clone + Send + Sync + 'static, TcpR: Clone + Send + Sync + 'static, UnixR: Clone + Send + Sync + 'static, TlsR: Clone + Send + Sync + 'static, UdpR: Clone + Send + Sync + 'static,