pub trait Write {
// Required methods
fn flush(&mut self) -> Result<()>;
fn write_buffered(&mut self, buf: &[u8]) -> Result<usize>;
// Provided methods
fn write(&mut self, buf: &[u8]) -> Result<usize> { ... }
fn write_all(&mut self, buf: &[u8]) -> Result<()> { ... }
}