use std::fmt; // ANCHOR: here type Result = std::result::Result; // ANCHOR_END: here // ANCHOR: there pub trait Write { fn write(&mut self, buf: &[u8]) -> Result; fn flush(&mut self) -> Result<()>; fn write_all(&mut self, buf: &[u8]) -> Result<()>; fn write_fmt(&mut self, fmt: fmt::Arguments) -> Result<()>; } // ANCHOR_END: there