std_traits::num

Trait Integer

source
pub trait Integer:
    Number
    + Ord
    + Eq
    + Hash {
    type Unsigned: Unsigned;
    type Signed: Signed;

    // Required methods
    fn to_unsigned(self) -> Self::Unsigned;
    fn to_signed(self) -> Self::Signed;
}

Required Associated Types§

Required Methods§

source

fn to_unsigned(self) -> Self::Unsigned

source

fn to_signed(self) -> Self::Signed

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.

Implementations on Foreign Types§

source§

impl Integer for i8

source§

impl Integer for i16

source§

impl Integer for i32

source§

impl Integer for i64

source§

impl Integer for i128

source§

impl Integer for isize

source§

impl Integer for u8

source§

impl Integer for u16

source§

impl Integer for u32

source§

impl Integer for u64

source§

impl Integer for u128

source§

impl Integer for usize

Implementors§