pub trait Unblocker {
    type UnblockFuture<'a, F, T>: Future<Output = T> + Send
       where Self: 'a,
             F: Send + 'a,
             T: Send + 'a;

    // Required method
    fn unblock<'a, F, T>(&'a self, f: F) -> Self::UnblockFuture<'a, F, T>
       where F: FnOnce() -> T + Send + 'a,
             T: Send + 'a;
}

Required Associated Types§

source

type UnblockFuture<'a, F, T>: Future<Output = T> + Send where Self: 'a, F: Send + 'a, T: Send + 'a

Required Methods§

source

fn unblock<'a, F, T>(&'a self, f: F) -> Self::UnblockFuture<'a, F, T>
where F: FnOnce() -> T + Send + 'a, T: Send + 'a,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<U> Unblocker for &U
where U: Unblocker,

§

type UnblockFuture<'a, F, T> = <U as Unblocker>::UnblockFuture<'a, F, T> where Self: 'a, F: Send + 'a, T: Send + 'a

source§

fn unblock<'a, F, T>(&'a self, f: F) -> Self::UnblockFuture<'a, F, T>
where F: FnOnce() -> T + Send + 'a, T: Send + 'a,

source§

impl<U> Unblocker for &mut U
where U: Unblocker,

§

type UnblockFuture<'a, F, T> = <U as Unblocker>::UnblockFuture<'a, F, T> where Self: 'a, F: Send + 'a, T: Send + 'a

source§

fn unblock<'a, F, T>(&'a self, f: F) -> Self::UnblockFuture<'a, F, T>
where F: FnOnce() -> T + Send + 'a, T: Send + 'a,

Implementors§

source§

impl Unblocker for BlockingUnblocker

§

type UnblockFuture<'a, F, T> = BlockingFuture<'a, T> where Self: 'a, F: Send + 'a, T: Send + 'a