Trait std::io::WriteExtUnstable [-] [+] [src]

pub trait WriteExt: Write + Sized {
    fn by_ref(&mut self) -> &mut Self { ... }
    fn broadcast<W: Write>(self, other: W) -> Broadcast<Self, W> { ... }
}

Extension methods for all instances of Write, typically imported through std::io::prelude::*.

Provided Methods

fn by_ref(&mut self) -> &mut Self

Create a "by reference" adaptor for this instance of Write.

The returned adaptor also implements Write and will simply borrow this current writer.

fn broadcast<W: Write>(self, other: W) -> Broadcast<Self, W>

Creates a new writer which will write all data to both this writer and another writer.

All data written to the returned writer will both be written to self as well as other. Note that the error semantics of the current implementation do not precisely track where errors happen. For example an error on the second call to write will not report that the first call to write succeeded.

Implementors