pub trait IntegerProperties: PrimInt + Debug + Display {
    type Dual: IntegerType;

    const BITS: u64;
    const MAX: Self;
    const MIN: Self;

    fn is_signed() -> bool;
    fn type_name() -> &'static str;
    fn into_dual(self) -> Self::Dual;
}
Expand description

Properties common to all integer types.

Required Associated Types§

Required Associated Constants§

Returns the number of bits required to represent this integer.

Returns the maximum value representable by this integer.

Returns the minimum value representable by this integer.

Required Methods§

Returns true if Self is a signed integer and false otherwise.

Returns the name of the integer type as a string slice. (i.e. “u8”)

Casts self into its dual.

Implementations on Foreign Types§

Implementors§