pub trait Encoder<Item, const N: usize> {
type Error: From<EncodeError>;
// Required method
fn to_bytes(
&mut self,
item: Item,
dst: &mut Vec<u8, N>,
) -> Result<(), Self::Error>;
}Expand description
Encoder trait to encode runtime or compile time messages for diagnsotic applications into streamable
bytes. Similar but adapted from the tokio_utils Encoder to be used within a no_std environment.
Required Associated Types§
Sourcetype Error: From<EncodeError>
type Error: From<EncodeError>
The type of encoding errors.