Internal

Trait Internal 

Source
trait Internal {
    type LengthInWords: ArrayLength;
}
Expand description

Private API to simplify bounds that users don’t need to care about.

The name is like this because it appears in the public API docs as a bound, but doesn’t get linked to.

Required Associated Types§

Source

type LengthInWords: ArrayLength

See the sole implementation docs for the value.

The bounds here are what are required by WakerShared::new.

Implementations on Foreign Types§

Source§

impl<const LEN: usize> Internal for Const<LEN>
where Const<LEN>: DivCeilUsizeBits<Output: ArrayLength>,

Source§

type LengthInWords = <Const<LEN> as DivCeilUsizeBits>::Output

The length in “words” (usizes) required to store at least LEN bits.

This is essentially LEN.div_ceil(usize::BITS), but implemented as (LEN + usize::BITS - 1) / usize::BITS because that’s what operations typenum provides.

The extra intermediate traits are required to force normalization of the associated types.

Implementors§