Trait async_blocking_stdio::StdioExt

source ·
pub trait StdioExt: StdioSealed {
    type Handle;
    type Locked<'lt>;
    type LockedAndSync<'lt>;

    // Required method
    fn async_handle() -> Self::Handle
       where Self::Handle: Sized;
}
Expand description

Extension trait that provides easy access to the corresponding asynchronous types for the streams in std::io

Required Associated Types§

source

type Handle

Handle to the async version of the standard io stream.

source

type Locked<'lt>

Lock on the async handle to this async-wrapped/unblocked standard io stream.

source

type LockedAndSync<'lt>

Lock on the async handle to this async-wrapped/unblocked standard io stream, wrapped again so that the synchronous traits from std::io can be used on it.

Required Methods§

source

fn async_handle() -> Self::Handle
where Self::Handle: Sized,

Get the handle to the global asynchronous version of this standard io stream as provided by async_blocking_stdio.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl StdioExt for Stderr

§

type Handle = MutexUnblockHandle<<Stderr as StdioSealed>::Unblocked>

§

type Locked<'lt> = MutexUnblockGuard<'lt, <Stderr as StdioSealed>::Unblocked>

§

type LockedAndSync<'lt> = BlockOn<<Stderr as StdioExt>::Locked<'static>>

source§

fn async_handle() -> Self::Handle
where Self::Handle: Sized,

source§

impl StdioExt for Stdin

§

type Handle = MutexUnblockHandle<<Stdin as StdioSealed>::Unblocked>

§

type Locked<'lt> = MutexUnblockGuard<'lt, <Stdin as StdioSealed>::Unblocked>

§

type LockedAndSync<'lt> = BlockOn<<Stdin as StdioExt>::Locked<'static>>

source§

fn async_handle() -> Self::Handle
where Self::Handle: Sized,

source§

impl StdioExt for Stdout

§

type Handle = MutexUnblockHandle<<Stdout as StdioSealed>::Unblocked>

§

type Locked<'lt> = MutexUnblockGuard<'lt, <Stdout as StdioSealed>::Unblocked>

§

type LockedAndSync<'lt> = BlockOn<<Stdout as StdioExt>::Locked<'static>>

source§

fn async_handle() -> Self::Handle
where Self::Handle: Sized,

Implementors§