Skip to main content

SbInt

Trait SbInt 

Source
pub trait SbInt:
    Copy
    + Eq
    + PartialOrd<Self>
    + AddAssign<Self>
    + Add<Self, Output = Self>
    + Mul<Self, Output = Self>
    + Display {
    const ZERO: Self;
    const ONE: Self;
    const SIGNED: bool;

    // Required methods
    fn lt1(self, other: Self) -> bool;
    fn avg(self, other: Self) -> Self;
    fn abs(self) -> Self;
    fn neg(self) -> Self;
    fn steps(self, from: (Self, Self), to: (Self, Self)) -> Self;
}

Required Associated Constants§

Source

const ZERO: Self

Source

const ONE: Self

Source

const SIGNED: bool

Required Methods§

Source

fn lt1(self, other: Self) -> bool

Source

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

Source

fn abs(self) -> Self

Source

fn neg(self) -> Self

Source

fn steps(self, from: (Self, Self), to: (Self, Self)) -> 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 SbInt for i8

Source§

const ZERO: i8 = 0

Source§

const ONE: i8 = 1

Source§

const SIGNED: bool = true

Source§

fn lt1(self, other: Self) -> bool

Source§

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

Source§

fn abs(self) -> Self

Source§

fn neg(self) -> Self

Source§

fn steps(self, from: (Self, Self), to: (Self, Self)) -> Self

Source§

impl SbInt for i16

Source§

const ZERO: i16 = 0

Source§

const ONE: i16 = 1

Source§

const SIGNED: bool = true

Source§

fn lt1(self, other: Self) -> bool

Source§

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

Source§

fn abs(self) -> Self

Source§

fn neg(self) -> Self

Source§

fn steps(self, from: (Self, Self), to: (Self, Self)) -> Self

Source§

impl SbInt for i32

Source§

const ZERO: i32 = 0

Source§

const ONE: i32 = 1

Source§

const SIGNED: bool = true

Source§

fn lt1(self, other: Self) -> bool

Source§

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

Source§

fn abs(self) -> Self

Source§

fn neg(self) -> Self

Source§

fn steps(self, from: (Self, Self), to: (Self, Self)) -> Self

Source§

impl SbInt for i64

Source§

const ZERO: i64 = 0

Source§

const ONE: i64 = 1

Source§

const SIGNED: bool = true

Source§

fn lt1(self, other: Self) -> bool

Source§

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

Source§

fn abs(self) -> Self

Source§

fn neg(self) -> Self

Source§

fn steps(self, from: (Self, Self), to: (Self, Self)) -> Self

Source§

impl SbInt for i128

Source§

const ZERO: i128 = 0

Source§

const ONE: i128 = 1

Source§

const SIGNED: bool = true

Source§

fn lt1(self, other: Self) -> bool

Source§

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

Source§

fn abs(self) -> Self

Source§

fn neg(self) -> Self

Source§

fn steps(self, from: (Self, Self), to: (Self, Self)) -> Self

Source§

impl SbInt for isize

Source§

const ZERO: isize = 0

Source§

const ONE: isize = 1

Source§

const SIGNED: bool = true

Source§

fn lt1(self, other: Self) -> bool

Source§

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

Source§

fn abs(self) -> Self

Source§

fn neg(self) -> Self

Source§

fn steps(self, from: (Self, Self), to: (Self, Self)) -> Self

Source§

impl SbInt for u8

Source§

const ZERO: u8 = 0

Source§

const ONE: u8 = 1

Source§

const SIGNED: bool = false

Source§

fn lt1(self, other: Self) -> bool

Source§

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

Source§

fn abs(self) -> Self

Source§

fn neg(self) -> Self

Source§

fn steps(self, from: (Self, Self), to: (Self, Self)) -> Self

Source§

impl SbInt for u16

Source§

const ZERO: u16 = 0

Source§

const ONE: u16 = 1

Source§

const SIGNED: bool = false

Source§

fn lt1(self, other: Self) -> bool

Source§

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

Source§

fn abs(self) -> Self

Source§

fn neg(self) -> Self

Source§

fn steps(self, from: (Self, Self), to: (Self, Self)) -> Self

Source§

impl SbInt for u32

Source§

const ZERO: u32 = 0

Source§

const ONE: u32 = 1

Source§

const SIGNED: bool = false

Source§

fn lt1(self, other: Self) -> bool

Source§

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

Source§

fn abs(self) -> Self

Source§

fn neg(self) -> Self

Source§

fn steps(self, from: (Self, Self), to: (Self, Self)) -> Self

Source§

impl SbInt for u64

Source§

const ZERO: u64 = 0

Source§

const ONE: u64 = 1

Source§

const SIGNED: bool = false

Source§

fn lt1(self, other: Self) -> bool

Source§

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

Source§

fn abs(self) -> Self

Source§

fn neg(self) -> Self

Source§

fn steps(self, from: (Self, Self), to: (Self, Self)) -> Self

Source§

impl SbInt for u128

Source§

const ZERO: u128 = 0

Source§

const ONE: u128 = 1

Source§

const SIGNED: bool = false

Source§

fn lt1(self, other: Self) -> bool

Source§

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

Source§

fn abs(self) -> Self

Source§

fn neg(self) -> Self

Source§

fn steps(self, from: (Self, Self), to: (Self, Self)) -> Self

Source§

impl SbInt for usize

Source§

const ZERO: usize = 0

Source§

const ONE: usize = 1

Source§

const SIGNED: bool = false

Source§

fn lt1(self, other: Self) -> bool

Source§

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

Source§

fn abs(self) -> Self

Source§

fn neg(self) -> Self

Source§

fn steps(self, from: (Self, Self), to: (Self, Self)) -> Self

Implementors§