UInt

Trait UInt 

Source
pub trait UInt:
    Copy
    + From<u8>
    + From<bool>
    + Add<Output = Self>
    + Sub<Output = Self>
    + Mul<Output = Self>
    + Div<Output = Self>
    + BitAnd<Output = Self>
    + BitOr<Output = Self>
    + Shl<u8, Output = Self>
    + Shl<i32, Output = Self>
    + Shl<u32, Output = Self>
    + Shr<i32, Output = Self>
    + Shr<u32, Output = Self>
    + BitOrAssign
    + BitXorAssign
    + PartialOrd
    + Into<u64>
    + Display {
    type Signed: Ord;

    // Required methods
    fn wrapping_sub(self, other: Self) -> Self;
    fn truncate(big: u64) -> Self;
    fn enlarge(small: u32) -> Self;
    fn to_signed(self) -> Self::Signed;
}

Required Associated Types§

Required Methods§

Source

fn wrapping_sub(self, other: Self) -> Self

Source

fn truncate(big: u64) -> Self

Source

fn enlarge(small: u32) -> Self

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 UInt for u32

Source§

type Signed = i32

Source§

fn wrapping_sub(self, other: Self) -> Self

Source§

fn truncate(big: u64) -> Self

Source§

fn enlarge(small: u32) -> Self

Source§

fn to_signed(self) -> Self::Signed

Source§

impl UInt for u64

Source§

type Signed = i64

Source§

fn wrapping_sub(self, other: Self) -> Self

Source§

fn truncate(big: u64) -> Self

Source§

fn enlarge(small: u32) -> Self

Source§

fn to_signed(self) -> Self::Signed

Implementors§