fuel_core_storage::codec

Trait Encoder

source
pub trait Encoder {
    // Required method
    fn as_bytes(&self) -> Cow<'_, [u8]>;
}
Expand description

The trait is usually implemented by the encoder that stores serialized objects.

Required Methods§

source

fn as_bytes(&self) -> Cow<'_, [u8]>

Returns the serialized object as a slice.

Implementations on Foreign Types§

source§

impl<'a> Encoder for Cow<'a, [u8]>

source§

fn as_bytes(&self) -> Cow<'_, [u8]>

source§

impl<const SIZE: usize> Encoder for [u8; SIZE]

source§

fn as_bytes(&self) -> Cow<'_, [u8]>

Implementors§