Trait reth_db::table::Decode

pub trait Decode:
    Sized
    + Send
    + Sync
    + Debug {
    // Required method
    fn decode<B>(value: B) -> Result<Self, DatabaseError>
       where B: AsRef<[u8]>;
}
Expand description

Trait that will transform the data to be read from the DB.

Required Methods§

fn decode<B>(value: B) -> Result<Self, DatabaseError>
where B: AsRef<[u8]>,

Decodes data coming from the database.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl Decode for u8

§

fn decode<B>(value: B) -> Result<u8, DatabaseError>
where B: AsRef<[u8]>,

§

impl Decode for u16

§

fn decode<B>(value: B) -> Result<u16, DatabaseError>
where B: AsRef<[u8]>,

§

impl Decode for u32

§

fn decode<B>(value: B) -> Result<u32, DatabaseError>
where B: AsRef<[u8]>,

§

impl Decode for u64

§

fn decode<B>(value: B) -> Result<u64, DatabaseError>
where B: AsRef<[u8]>,

§

impl Decode for String

§

fn decode<B>(value: B) -> Result<String, DatabaseError>
where B: AsRef<[u8]>,

§

impl Decode for Vec<u8>

§

fn decode<B>(value: B) -> Result<Vec<u8>, DatabaseError>
where B: AsRef<[u8]>,

§

impl Decode for Address

§

fn decode<B>(value: B) -> Result<Address, DatabaseError>
where B: AsRef<[u8]>,

§

impl Decode for FixedBytes<32>

§

fn decode<B>(value: B) -> Result<FixedBytes<32>, DatabaseError>
where B: AsRef<[u8]>,

§

impl Decode for PruneSegment

§

fn decode<B>(value: B) -> Result<PruneSegment, DatabaseError>
where B: AsRef<[u8]>,

§

impl Decode for StoredNibbles

§

fn decode<B>(value: B) -> Result<StoredNibbles, DatabaseError>
where B: AsRef<[u8]>,

§

impl Decode for StoredNibblesSubKey

§

fn decode<B>(value: B) -> Result<StoredNibblesSubKey, DatabaseError>
where B: AsRef<[u8]>,

Implementors§