Trait UInt

Source
pub trait UInt:
    Default
    + Copy
    + BitXorAssign
    + BitXor<Output = Self>
    + Shl<u32, Output = Self>
    + Shr<u32, Output = Self> {
    const BITS: u32;

    // Required methods
    fn as_usize(self) -> usize;
    fn one() -> Self;
}

Required Associated Constants§

Required Methods§

Source

fn as_usize(self) -> usize

Source

fn one() -> Self

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§

const BITS: u32 = 32u32

Source§

fn as_usize(self) -> usize

Source§

fn one() -> Self

Source§

impl UInt for u64

Source§

const BITS: u32 = 64u32

Source§

fn as_usize(self) -> usize

Source§

fn one() -> Self

Source§

impl UInt for usize

Source§

const BITS: u32 = 64u32

Source§

fn as_usize(self) -> usize

Source§

fn one() -> Self

Implementors§