Types that implement writable stream semantics.
Required methods
-
Write the buffer to the stream.
Returns the number of bytes written. This may be less than the size of the buffer. See also write_all, which can be used to write the entire buffer.
-
Flush the stream
This may be a no-op, depending on the stream.
Provided methods
-
Writes all the bytes in the buffer to the stream.
If EOF is reached, returns
Error::eof()
.