pub trait Write {
type Error: Into<Error>;
// Required method
fn write_all(&mut self, buf: &[u8]) -> Result<(), Self::Error>;
}Expand description
A sink for serialized CBOR.
This trait is similar to the Write trait in the standard library,
but has a smaller and more general API.
Any object implementing std::io::Write
can be wrapped in an IoWrite that implements
this trait for the underlying object.
This trait is sealed by default, enabling the unsealed_read_write feature removes this bound
to allow objects outside of this crate to implement this trait.