Struct std::io::LineWriterUnstable
[-] [+]
[src]
pub struct LineWriter<W> { // some fields omitted }
Wraps a Writer and buffers output to it, flushing whenever a newline
(0x0a
, '\n'
) is detected.
This writer will be flushed when it is dropped.
Methods
impl<W: Write> LineWriter<W>
fn new(inner: W) -> LineWriter<W>
Creates a new LineWriter
fn get_ref<'a>(&'a self) -> &'a W
Gets a reference to the underlying writer.
This type does not expose the ability to get a mutable reference to the underlying reader because that could possibly corrupt the buffer.
fn into_inner(self) -> Result<W, IntoInnerError<LineWriter<W>>>
Unwraps this LineWriter
, returning the underlying writer.
The internal buffer is flushed before returning the writer.