parity_scale_codec

Trait 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.

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<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§