MachineInteger

Trait MachineInteger 

Source
pub trait MachineInteger {
    const SIGNED: bool;

    // Required method
    fn bits() -> u32;
}
Expand description

A trait for types that represent machine integers.

Required Associated Constants§

Source

const SIGNED: bool

The signedness of this integer type.

Required Methods§

Source

fn bits() -> u32

The size of this integer type in bits.

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 MachineInteger for i8

Source§

const SIGNED: bool = true

Source§

fn bits() -> u32

Source§

impl MachineInteger for i16

Source§

const SIGNED: bool = true

Source§

fn bits() -> u32

Source§

impl MachineInteger for i32

Source§

const SIGNED: bool = true

Source§

fn bits() -> u32

Source§

impl MachineInteger for i64

Source§

const SIGNED: bool = true

Source§

fn bits() -> u32

Source§

impl MachineInteger for i128

Source§

const SIGNED: bool = true

Source§

fn bits() -> u32

Source§

impl MachineInteger for u8

Source§

const SIGNED: bool = false

Source§

fn bits() -> u32

Source§

impl MachineInteger for u16

Source§

const SIGNED: bool = false

Source§

fn bits() -> u32

Source§

impl MachineInteger for u32

Source§

const SIGNED: bool = false

Source§

fn bits() -> u32

Source§

impl MachineInteger for u64

Source§

const SIGNED: bool = false

Source§

fn bits() -> u32

Source§

impl MachineInteger for u128

Source§

const SIGNED: bool = false

Source§

fn bits() -> u32

Implementors§