alloy_rlp

Trait MaxEncodedLenAssoc

Source
pub unsafe trait MaxEncodedLenAssoc: Encodable {
    const LEN: usize;
}
Expand description

Defines the max length of an Encodable type as an associated constant.

§Safety

An invalid value can cause the encoder to panic.

Required Associated Constants§

Source

const LEN: usize

The maximum length.

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 MaxEncodedLenAssoc for bool

Source§

const LEN: usize = 2usize

Source§

impl MaxEncodedLenAssoc for u8

Source§

const LEN: usize = 2usize

Source§

impl MaxEncodedLenAssoc for u16

Source§

const LEN: usize = 3usize

Source§

impl MaxEncodedLenAssoc for u32

Source§

const LEN: usize = 5usize

Source§

impl MaxEncodedLenAssoc for u64

Source§

const LEN: usize = 9usize

Source§

impl MaxEncodedLenAssoc for u128

Source§

const LEN: usize = 17usize

Source§

impl MaxEncodedLenAssoc for usize

Source§

const LEN: usize = 9usize

Source§

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

Source§

const LEN: usize = _

Implementors§