pub trait DInt: MinInt {
type H: HInt<D = Self>;
// Required methods
fn lo(self) -> Self::H;
fn hi(self) -> Self::H;
// Provided methods
fn lo_hi(self) -> (Self::H, Self::H) { ... }
fn from_lo_hi(lo: Self::H, hi: Self::H) -> Self { ... }
}
Expand description
Trait for integers twice the bit width of another integer. This is implemented for all
primitives except for u8
, because there is not a smaller primitive.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn from_lo_hi(lo: Self::H, hi: Self::H) -> Self
fn from_lo_hi(lo: Self::H, hi: Self::H) -> Self
Constructs an integer using lower and higher half parts
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.