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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

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<'_>

source§

impl AsLockedWrite for dyn Write

source§

type Write<'w> = &'w mut (dyn Write + 'static)

source§

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

source§

impl AsLockedWrite for dyn Write + Send

source§

type Write<'w> = &'w mut (dyn Write + Send + 'static)

source§

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

source§

impl AsLockedWrite for dyn Write + Send + Sync

source§

type Write<'w> = &'w mut (dyn Write + Sync + Send + 'static)

source§

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

source§

impl<T: AsLockedWrite + ?Sized> AsLockedWrite for &mut T

source§

type Write<'w> = <T as AsLockedWrite>::Write<'w> where Self: 'w

source§

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

source§

impl<T: AsLockedWrite + ?Sized> AsLockedWrite for Box<T>

source§

type Write<'w> = <T as AsLockedWrite>::Write<'w> where Self: 'w

source§

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

Implementors§