Trait typenum::type_operators::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.

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

§

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

§

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