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§
Sourcetype LengthInWords: ArrayLength
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>
impl<const LEN: usize> Internal for Const<LEN>
Source§type LengthInWords = <Const<LEN> as DivCeilUsizeBits>::Output
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.