reth_db::mdbx

Trait TableObject

Source
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§

Source

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

Decodes the object from the given bytes.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

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

Source§

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

Source§

impl TableObject for ()

Source§

impl TableObject for Vec<u8>

Source§

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

Source§

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

Source§

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

Implementors§