Skip to main content

IntValue

Trait IntValue 

Source
pub trait IntValue:
    Clone
    + Display
    + Ord
    + Mul<Output = Self>
    + Add<Output = Self> {
    // Required methods
    fn increment(&self) -> Self;
    fn decrement(&self) -> Self;
    fn shift_left(&self) -> Self;
    fn from_digit(byte: u8) -> Self;
}
Expand description

A contract that must be observed for the value in an IntAtomic.

Implementations are provided for signed machine integers.

Required Methods§

Source

fn increment(&self) -> Self

Source

fn decrement(&self) -> Self

Source

fn shift_left(&self) -> Self

Multiply self by the radix.

Source

fn from_digit(byte: u8) -> Self

Create self from char. Can panic if not possible.

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

Source§

fn increment(&self) -> Self

Source§

fn decrement(&self) -> Self

Source§

fn shift_left(&self) -> Self

Source§

fn from_digit(byte: u8) -> Self

Source§

impl IntValue for i16

Source§

fn increment(&self) -> Self

Source§

fn decrement(&self) -> Self

Source§

fn shift_left(&self) -> Self

Source§

fn from_digit(byte: u8) -> Self

Source§

impl IntValue for i32

Source§

fn increment(&self) -> Self

Source§

fn decrement(&self) -> Self

Source§

fn shift_left(&self) -> Self

Source§

fn from_digit(byte: u8) -> Self

Source§

impl IntValue for i64

Source§

fn increment(&self) -> Self

Source§

fn decrement(&self) -> Self

Source§

fn shift_left(&self) -> Self

Source§

fn from_digit(byte: u8) -> Self

Source§

impl IntValue for u8

Source§

fn increment(&self) -> Self

Source§

fn decrement(&self) -> Self

Source§

fn shift_left(&self) -> Self

Source§

fn from_digit(byte: u8) -> Self

Source§

impl IntValue for u16

Source§

fn increment(&self) -> Self

Source§

fn decrement(&self) -> Self

Source§

fn shift_left(&self) -> Self

Source§

fn from_digit(byte: u8) -> Self

Source§

impl IntValue for u32

Source§

fn increment(&self) -> Self

Source§

fn decrement(&self) -> Self

Source§

fn shift_left(&self) -> Self

Source§

fn from_digit(byte: u8) -> Self

Source§

impl IntValue for u64

Source§

fn increment(&self) -> Self

Source§

fn decrement(&self) -> Self

Source§

fn shift_left(&self) -> Self

Source§

fn from_digit(byte: u8) -> Self

Implementors§