Trait async_compat::CompatExt[][src]

pub trait CompatExt {
    fn compat(self) -> Compat<Self>

Notable traits for Compat<T>

impl<T: Future> Future for Compat<T> type Output = T::Output;

    where
        Self: Sized
;
fn compat_ref(&self) -> Compat<&Self>

Notable traits for Compat<T>

impl<T: Future> Future for Compat<T> type Output = T::Output;
;
fn compat_mut(&mut self) -> Compat<&mut Self>

Notable traits for Compat<T>

impl<T: Future> Future for Compat<T> type Output = T::Output;
; }

Applies the Compat adapter to futures and I/O types.

Required methods

fn compat(self) -> Compat<Self>

Notable traits for Compat<T>

impl<T: Future> Future for Compat<T> type Output = T::Output;
where
    Self: Sized
[src]

Applies the Compat adapter by value.

Examples

use async_compat::CompatExt;

let stdout = tokio::io::stdout().compat();

fn compat_ref(&self) -> Compat<&Self>

Notable traits for Compat<T>

impl<T: Future> Future for Compat<T> type Output = T::Output;
[src]

Applies the Compat adapter by shared reference.

Examples

use async_compat::CompatExt;

let original = tokio::io::stdout();
let stdout = original.compat_ref();

fn compat_mut(&mut self) -> Compat<&mut Self>

Notable traits for Compat<T>

impl<T: Future> Future for Compat<T> type Output = T::Output;
[src]

Applies the Compat adapter by mutable reference.

Examples

use async_compat::CompatExt;

let mut original = tokio::io::stdout();
let stdout = original.compat_mut();
Loading content...

Implementors

impl<T> CompatExt for T[src]

Loading content...