pub trait ByteEncoder: BaseEncoder {
// Required methods
fn put_slice(&mut self, slice: &[u8]) -> Result<(), Self::Error>;
fn put_byte(&mut self, byte: u8) -> Result<(), Self::Error>;
}Expand description
A trait for encoders that can handle byte encodables.
This trait extends BaseEncoder to include types and methods specifically
used for handling any kind of byte encodables. Encoders may use this
trait as bounds for generic encodables to signal that the output will be any
kind of byte steam.
Note that all ByteEncoders also implement StrEncoder.