pub trait Write { // Required method fn write(&mut self, buf: &[u8]) -> Result<usize, Error>; }
Implementors of the Write trait are sometimes called ‘writers’.
Write
Writers are defined by one required method, [write()].
write()
Write a buffer into this writer, returning how many bytes were written.
This function will attempt to write the entire contents of buf, but the entire write may not succeed, or the write may also generate an error.
buf