Trait arithmetic_eval::arith::DoubleWidth[][src]

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.

Associated Types

type Wide: Copy + From<Self> + TryInto<Self> + NumOps + Unsigned[src]

Unsigned double-width extension type.

type SignedWide: Copy + From<Self> + TryInto<Self> + NumOps + Zero + One + Signed + PartialOrd[src]

Signed double-width extension type.

Implementations on Foreign Types

impl DoubleWidth for u8[src]

type Wide = u16

type SignedWide = i16

impl DoubleWidth for u16[src]

type Wide = u32

type SignedWide = i32

impl DoubleWidth for u32[src]

type Wide = u64

type SignedWide = i64

impl DoubleWidth for u64[src]

type Wide = u128

type SignedWide = i128

Implementors