Trait arithmetic_eval::arith::DoubleWidth
source · pub trait DoubleWidth: Sized + Unsigned {
type Wide: Copy + From<Self> + TryInto<Self> + NumOps + Unsigned;
type SignedWide: Copy + From<Self> + TryInto<Self> + NumOps + Zero + One + Signed + PartialOrd;
}
Expand description
Encapsulates extension of an unsigned integer type into signed and unsigned double-width types. This allows performing certain operations (e.g., multiplication) without a possibility of integer overflow.
Required Associated Types§
sourcetype Wide: Copy + From<Self> + TryInto<Self> + NumOps + Unsigned
type Wide: Copy + From<Self> + TryInto<Self> + NumOps + Unsigned
Unsigned double-width extension type.
sourcetype SignedWide: Copy + From<Self> + TryInto<Self> + NumOps + Zero + One + Signed + PartialOrd
type SignedWide: Copy + From<Self> + TryInto<Self> + NumOps + Zero + One + Signed + PartialOrd
Signed double-width extension type.
Object Safety§
This trait is not object safe.