GetSmallestUIntUpTo

Trait GetSmallestUIntUpTo 

Source
pub trait GetSmallestUIntUpTo: Unsigned + GetSmallestUIntUpTo {
    type Type: Default + PrimInt + NumAssign;
}
Expand description

Gets the smallest unsigned integer type capable of representing all values up to, but not including, the value of Self.

Self is an unsigned type-level integer.

The type is provided as the associated type Self::Type. If you just want the type and aren’t specifying trait bounds, use the type alias SmallestUIntUpTo.

Required Associated Types§

Source

type Type: Default + PrimInt + NumAssign

The unsigned integer type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<N> GetSmallestUIntUpTo for N
where N: GetSmallestUIntUpTo,

Source§

type Type = <N as GetSmallestUIntUpTo>::Type