Logarithm2 in typenum::type_operators - Rust
Description: A type operator for taking the integer binary logarithm of `Self`.
Keywords: rust, rustlang, rust-lang, Logarithm2

# Trait typenum::type_operators::Logarithm2

source ·

    pub trait Logarithm2 {
        type Output;
    }

Expand description

A type operator for taking the integer binary logarithm of `Self`.

The integer binary logarighm of `n` is the largest integer `m` such that `n >= 2^m`. This definition is equivalent to truncating the real-valued binary logarithm: `floor(log2(n))`.

## Required Associated Types§

source

#### type Output

The result of the integer binary logarithm.

## Implementors§

source§

### impl<N> Logarithm2 for Nwhere
N: PrivateLogarithm2,

§

#### type Output = <N as PrivateLogarithm2>::Output