Trait heed_traits::BytesEncode
source · pub trait BytesEncode<'a> {
type EItem: ?Sized + 'a;
// Required method
fn bytes_encode(item: &'a Self::EItem) -> Result<Cow<'a, [u8]>, BoxedError>;
}
Expand description
A trait that represents an encoding structure.
Required Associated Types§
Required Methods§
sourcefn bytes_encode(item: &'a Self::EItem) -> Result<Cow<'a, [u8]>, BoxedError>
fn bytes_encode(item: &'a Self::EItem) -> Result<Cow<'a, [u8]>, BoxedError>
Encode the given item as bytes.
Object Safety§
This trait is not object safe.