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

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 Bytes

Source§

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

Source§

impl Decodable for BytesMut

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

Source§

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

Source§

impl Decodable for Ipv6Addr

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 [u8; N]

Source§

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

Implementors§