reth_db::mdbx

Trait TableObject

pub trait TableObject: Sized {
    // Required method
    fn decode(data_val: &[u8]) -> Result<Self, Error>;
}
Available on crate feature mdbx only.
Expand description

Implement this to be able to decode data values

Required Methods§

fn decode(data_val: &[u8]) -> Result<Self, Error>

Decodes the object from the given bytes.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl TableObject for Cow<'_, [u8]>

§

fn decode(_: &[u8]) -> Result<Cow<'_, [u8]>, Error>

§

impl TableObject for ()

§

fn decode(_: &[u8]) -> Result<(), Error>

§

impl TableObject for Vec<u8>

§

fn decode(data_val: &[u8]) -> Result<Vec<u8>, Error>

§

impl<const LEN: usize> TableObject for [u8; LEN]

§

fn decode(data_val: &[u8]) -> Result<[u8; LEN], Error>

Implementors§