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§

source

type EItem: ?Sized + 'a

The type to encode.

Required Methods§

source

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.

Implementors§