Struct genio::util::WriteTrunc [] [src]

pub struct WriteTrunc<W> { /* fields omitted */ }

Truncates writing so that at most n bytes in total are written into the writer.

Excess bytes are silently dropped.

Methods

impl<W: Write> WriteTrunc<W>
[src]

Initializes truncate.

Returns how many bytes remain until they will be truncated.

Trait Implementations

impl<W: Write> Write for WriteTrunc<W>
[src]

Value of this type is returned when write() fails. Read more

Value of this type is returned when flush() fails. In case of low-level writers flush often does nothing and therefore doesn't return error, so this type might be Void. Read more

Write a buffer into this object, returning how many bytes were written. Read more

Attempts to write an entire buffer into this Write.

Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more

Hints the writer how much bytes will be written after call to this function. At least min bytes should be written after the call to this function and if max is Some(x) than at most x bytes should be written. Read more