anstream::stream

Trait AsLockedWrite

Source
pub trait AsLockedWrite: Sealed {
    type Write<'w>: RawStream + 'w
       where Self: 'w;

    // Required method
    fn as_locked_write(&mut self) -> Self::Write<'_>;
}
Expand description

Lock a stream

Required Associated Types§

Source

type Write<'w>: RawStream + 'w where Self: 'w

Locked writer type

Required Methods§

Source

fn as_locked_write(&mut self) -> Self::Write<'_>

Lock a stream

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 AsLockedWrite for Box<dyn Write>

Source§

type Write<'w> = &'w mut Box<dyn Write>

Source§

fn as_locked_write(&mut self) -> Self::Write<'_>

Source§

impl AsLockedWrite for Vec<u8>

Source§

type Write<'w> = &'w mut Vec<u8>

Source§

fn as_locked_write(&mut self) -> Self::Write<'_>

Source§

impl AsLockedWrite for File

Source§

type Write<'w> = &'w mut File

Source§

fn as_locked_write(&mut self) -> Self::Write<'_>

Source§

impl AsLockedWrite for Stderr

Source§

type Write<'w> = StderrLock<'w>

Source§

fn as_locked_write(&mut self) -> Self::Write<'_>

Source§

impl AsLockedWrite for StderrLock<'static>

Source§

type Write<'w> = &'w mut StderrLock<'static>

Source§

fn as_locked_write(&mut self) -> Self::Write<'_>

Source§

impl AsLockedWrite for Stdout

Source§

type Write<'w> = StdoutLock<'w>

Source§

fn as_locked_write(&mut self) -> Self::Write<'_>

Source§

impl AsLockedWrite for StdoutLock<'static>

Source§

type Write<'w> = &'w mut StdoutLock<'static>

Source§

fn as_locked_write(&mut self) -> Self::Write<'_>

Implementors§