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

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 StdioExt for Stderr

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl StdioExt for Stdin

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl StdioExt for Stdout

Source§

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

Source§

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

Source§

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

Source§

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

Implementors§