Struct genio::std_impls::GenioWrite
[−]
[src]
pub struct GenioWrite<W>(_);
Wrapper providing genio::Write
trait for std::io::Write
types.
Methods
impl<W: Write> GenioWrite<W>
[src]
fn new(writer: W) -> Self
Wraps std
writer into genio
writer.
fn into_inner(self) -> W
Unwraps std
writer into genio
writer.
Trait Implementations
impl<W: Write> Write for GenioWrite<W>
[src]
type WriteError = Error
Value of this type is returned when write()
fails. Read more
type FlushError = Error
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
fn write(&mut self, buf: &[u8]) -> Result<usize, Error>
Write a buffer into this object, returning how many bytes were written. Read more
fn flush(&mut self) -> Result<(), Error>
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
fn write_all(&mut self, buf: &[u8]) -> Result<(), Self::WriteError>
Attempts to write an entire buffer into this Write
.
fn size_hint(&mut self, min: usize, max: Option<usize>)
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