custom_print/write_bytes.rs
1/// A trait for objects which can write bytes returning a specific output.
2///
3/// This trait is used by [`IoWriter`].
4///
5/// [`IoWriter`]: struct.IoWriter.html
6pub trait WriteBytes {
7 /// The resulting type after writing.
8 type Output;
9
10 /// Performs byte writing.
11 fn write_bytes(&mut self, buf: &[u8]) -> Self::Output;
12}