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§