Trait parity_scale_codec::DecodeLength

source ·
pub trait DecodeLength {
    // Required method
    fn len(self_encoded: &[u8]) -> Result<usize, Error>;
}
Expand description

Trait that allows the length of a collection to be read, without having to read and decode the entire elements.

Required Methods§

source

fn len(self_encoded: &[u8]) -> Result<usize, Error>

Return the number of elements in self_encoded.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<A0: DecodeLength, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> DecodeLength for (A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<B0: DecodeLength, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> DecodeLength for (B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<C0: DecodeLength, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> DecodeLength for (C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<D0: DecodeLength, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> DecodeLength for (D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<E0: DecodeLength, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> DecodeLength for (E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<F0: DecodeLength, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> DecodeLength for (F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<G0: DecodeLength, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> DecodeLength for (G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<H0: DecodeLength, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> DecodeLength for (H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<I0: DecodeLength, J0, K0, L0, M0, N0, O0, P0, Q0, R0> DecodeLength for (I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<J0: DecodeLength, K0, L0, M0, N0, O0, P0, Q0, R0> DecodeLength for (J0, K0, L0, M0, N0, O0, P0, Q0, R0)

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<K0: DecodeLength, L0, M0, N0, O0, P0, Q0, R0> DecodeLength for (K0, L0, M0, N0, O0, P0, Q0, R0)

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<K, V> DecodeLength for BTreeMap<K, V>

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<L0: DecodeLength, M0, N0, O0, P0, Q0, R0> DecodeLength for (L0, M0, N0, O0, P0, Q0, R0)

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<M0: DecodeLength, N0, O0, P0, Q0, R0> DecodeLength for (M0, N0, O0, P0, Q0, R0)

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<N0: DecodeLength, O0, P0, Q0, R0> DecodeLength for (N0, O0, P0, Q0, R0)

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<O0: DecodeLength, P0, Q0, R0> DecodeLength for (O0, P0, Q0, R0)

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<P0: DecodeLength, Q0, R0> DecodeLength for (P0, Q0, R0)

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<Q0: DecodeLength, R0> DecodeLength for (Q0, R0)

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<R0: DecodeLength> DecodeLength for (R0,)

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<T> DecodeLength for BinaryHeap<T>

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<T> DecodeLength for BTreeSet<T>

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<T> DecodeLength for LinkedList<T>

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<T> DecodeLength for VecDeque<T>

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

source§

impl<T> DecodeLength for Vec<T>

source§

fn len(self_encoded: &[u8]) -> Result<usize, Error>

Implementors§