alloy_rlp

Trait Decodable

source
pub trait Decodable: Sized {
    // Required method
    fn decode(buf: &mut &[u8]) -> Result<Self>;
}
Expand description

A type that can be decoded from an RLP blob.

Required Methods§

source

fn decode(buf: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past the decoded object.

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 IpAddr

Available on crate feature std only.
source§

fn decode(buf: &mut &[u8]) -> Result<Self>

source§

impl Decodable for bool

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

source§

impl Decodable for u8

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

source§

impl Decodable for u16

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

source§

impl Decodable for u32

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

source§

impl Decodable for u64

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

source§

impl Decodable for u128

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

source§

impl Decodable for usize

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

source§

impl Decodable for String

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

source§

impl Decodable for PhantomPinned

source§

fn decode(_buf: &mut &[u8]) -> Result<Self>

source§

impl Decodable for Ipv4Addr

Available on crate feature std only.
source§

fn decode(buf: &mut &[u8]) -> Result<Self>

source§

impl Decodable for Ipv6Addr

Available on crate feature std only.
source§

fn decode(buf: &mut &[u8]) -> Result<Self>

source§

impl Decodable for Bytes

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

source§

impl Decodable for BytesMut

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

source§

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

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

source§

impl<T: Decodable> Decodable for Rc<T>

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

source§

impl<T: Decodable> Decodable for Arc<T>

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

source§

impl<T: Decodable> Decodable for Vec<T>

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

source§

impl<T: ?Sized + ToOwned> Decodable for Cow<'_, T>
where T::Owned: Decodable,

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

source§

impl<T: ?Sized> Decodable for PhantomData<T>

source§

fn decode(_buf: &mut &[u8]) -> Result<Self>

source§

impl<const N: usize> Decodable for ArrayVec<u8, N>

Available on crate feature arrayvec only.
source§

fn decode(buf: &mut &[u8]) -> Result<Self>

source§

impl<const N: usize> Decodable for [u8; N]

source§

fn decode(from: &mut &[u8]) -> Result<Self>

Implementors§