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 = 5usize

source§

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

source§

const LEN: usize = _

Implementors§