Trait Decodable

Source
pub trait Decodable: Sized {
    // Required method
    fn decode(rlp: &Rlp<'_>) -> Result<Self, DecoderError>;
}
Expand description

RLP decodable trait

Required Methods§

Source

fn decode(rlp: &Rlp<'_>) -> Result<Self, DecoderError>

Decode a value from RLP 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 Decodable for bool

Source§

fn decode(rlp: &Rlp<'_>) -> Result<Self, DecoderError>

Source§

impl Decodable for u8

Source§

fn decode(rlp: &Rlp<'_>) -> Result<Self, DecoderError>

Source§

impl Decodable for u16

Source§

fn decode(rlp: &Rlp<'_>) -> Result<Self, DecoderError>

Source§

impl Decodable for u32

Source§

fn decode(rlp: &Rlp<'_>) -> Result<Self, DecoderError>

Source§

impl Decodable for u64

Source§

fn decode(rlp: &Rlp<'_>) -> Result<Self, DecoderError>

Source§

impl Decodable for u128

Source§

fn decode(rlp: &Rlp<'_>) -> Result<Self, DecoderError>

Source§

impl Decodable for usize

Source§

fn decode(rlp: &Rlp<'_>) -> Result<Self, DecoderError>

Source§

impl Decodable for Bytes

Source§

fn decode(rlp: &Rlp<'_>) -> Result<Self, DecoderError>

Source§

impl Decodable for BytesMut

Source§

fn decode(rlp: &Rlp<'_>) -> Result<Self, DecoderError>

Source§

impl Decodable for String

Source§

fn decode(rlp: &Rlp<'_>) -> Result<Self, DecoderError>

Source§

impl Decodable for Vec<u8>

Source§

fn decode(rlp: &Rlp<'_>) -> Result<Self, DecoderError>

Source§

impl<T> Decodable for Option<T>
where T: Decodable,

Source§

fn decode(rlp: &Rlp<'_>) -> Result<Self, DecoderError>

Source§

impl<T: Decodable> Decodable for Box<T>

Source§

fn decode(rlp: &Rlp<'_>) -> Result<Self, DecoderError>

Implementors§