Skip to main content

AnyUnsignedInteger

Trait AnyUnsignedInteger 

Source
pub trait AnyUnsignedInteger:
    Number
    + NumberMut
    + NumberBits
    + NumberBitsMut
    + NumberExact {
    // Required methods
    fn as_u8(&self) -> u8;
    fn as_u16(&self) -> u16;
    fn as_u32(&self) -> u32;
    fn as_u64(&self) -> u64;
    fn as_u128(&self) -> u128;
}
Expand description

Any unsigned integer

Required Methods§

Source

fn as_u8(&self) -> u8

Source

fn as_u16(&self) -> u16

Source

fn as_u32(&self) -> u32

Source

fn as_u64(&self) -> u64

Source

fn as_u128(&self) -> u128

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a> AnyUnsignedInteger for i8

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_u128(&self) -> u128

Source§

impl<'a> AnyUnsignedInteger for i16

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_u128(&self) -> u128

Source§

impl<'a> AnyUnsignedInteger for i32

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_u128(&self) -> u128

Source§

impl<'a> AnyUnsignedInteger for i64

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_u128(&self) -> u128

Source§

impl<'a> AnyUnsignedInteger for i128

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_u128(&self) -> u128

Source§

impl<'a> AnyUnsignedInteger for isize

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_u128(&self) -> u128

Source§

impl<'a> AnyUnsignedInteger for u8

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_u128(&self) -> u128

Source§

impl<'a> AnyUnsignedInteger for u16

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_u128(&self) -> u128

Source§

impl<'a> AnyUnsignedInteger for u32

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_u128(&self) -> u128

Source§

impl<'a> AnyUnsignedInteger for u64

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_u128(&self) -> u128

Source§

impl<'a> AnyUnsignedInteger for u128

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_u128(&self) -> u128

Source§

impl<'a> AnyUnsignedInteger for usize

Source§

fn as_u8(&self) -> u8

Source§

fn as_u16(&self) -> u16

Source§

fn as_u32(&self) -> u32

Source§

fn as_u64(&self) -> u64

Source§

fn as_u128(&self) -> u128

Implementors§