Len

Trait Len 

Source
pub trait Len {
    type Output: Unsigned;

    // Required method
    fn len(&self) -> Self::Output;
}
Expand description

A type operator that gives the length of an Array or the number of bits in a UInt.

Required Associated Types§

Source

type Output: Unsigned

The length as a type-level unsigned integer.

Required Methods§

Source

fn len(&self) -> Self::Output

This function isn’t used in this crate, but may be useful for others.

Implementations on Foreign Types§

Source§

impl Len for ()

Source§

type Output = UTerm

Source§

fn len(&self) -> Self::Output

Source§

impl<T0> Len for (T0,)

Source§

type Output = <UTerm as Add<B1>>::Output

Source§

fn len(&self) -> Self::Output

Source§

impl<T0, T1> Len for (T0, T1)

Source§

type Output = <UInt<UTerm, B1> as Add<B1>>::Output

Source§

fn len(&self) -> Self::Output

Source§

impl<T0, T1, T2> Len for (T0, T1, T2)

Source§

type Output = <UInt<UInt<UTerm, B1>, B0> as Add<B1>>::Output

Source§

fn len(&self) -> Self::Output

Source§

impl<T0, T1, T2, T3> Len for (T0, T1, T2, T3)

Source§

type Output = <UInt<UInt<UTerm, B1>, B1> as Add<B1>>::Output

Source§

fn len(&self) -> Self::Output

Source§

impl<T0, T1, T2, T3, T4> Len for (T0, T1, T2, T3, T4)

Source§

type Output = <UInt<UInt<UInt<UTerm, B1>, B0>, B0> as Add<B1>>::Output

Source§

fn len(&self) -> Self::Output

Source§

impl<T0, T1, T2, T3, T4, T5> Len for (T0, T1, T2, T3, T4, T5)

Source§

type Output = <UInt<UInt<UInt<UTerm, B1>, B0>, B1> as Add<B1>>::Output

Source§

fn len(&self) -> Self::Output

Source§

impl<T0, T1, T2, T3, T4, T5, T6> Len for (T0, T1, T2, T3, T4, T5, T6)

Source§

type Output = <UInt<UInt<UInt<UTerm, B1>, B1>, B0> as Add<B1>>::Output

Source§

fn len(&self) -> Self::Output

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7> Len for (T0, T1, T2, T3, T4, T5, T6, T7)

Source§

type Output = <UInt<UInt<UInt<UTerm, B1>, B1>, B1> as Add<B1>>::Output

Source§

fn len(&self) -> Self::Output

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> Len for (T0, T1, T2, T3, T4, T5, T6, T7, T8)

Source§

type Output = <UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0> as Add<B1>>::Output

Source§

fn len(&self) -> Self::Output

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> Len for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)

Source§

type Output = <UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1> as Add<B1>>::Output

Source§

fn len(&self) -> Self::Output

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Len for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

Source§

type Output = <UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, B0> as Add<B1>>::Output

Source§

fn len(&self) -> Self::Output

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Len for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

Source§

type Output = <UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, B1> as Add<B1>>::Output

Source§

fn len(&self) -> Self::Output

Implementors§

Source§

impl Len for ATerm

Length of ATerm by itself is 0

Source§

impl Len for UTerm

Length of UTerm by itself is 0

Source§

impl<U, B: Bit> Len for UInt<U, B>
where U: Len + Unsigned, Length<U>: Add<B1>, Add1<Length<U>>: Unsigned,

Length of a bit is 1

Source§

type Output = <<U as Len>::Output as Add<B1>>::Output

Source§

impl<V, A> Len for TArr<V, A>
where A: Len, Length<A>: Add<B1>, Sum<Length<A>, B1>: Unsigned,

Size of a TypeArray

Source§

type Output = <<A as Len>::Output as Add<B1>>::Output