Trait InherentLimits

Source
pub trait InherentLimits<T>: 'static {
    const MIN: Self;
    const MAX: Self;
    const MIN_INT: T;
    const MAX_INT: T;

    // Required methods
    fn is_zero(&self) -> bool;
    fn is_negative(&self) -> bool;
    fn is_positive(&self) -> bool;
}

Required Associated Constants§

Source

const MIN: Self

Source

const MAX: Self

Source

const MIN_INT: T

Source

const MAX_INT: T

Required Methods§

Source

fn is_zero(&self) -> bool

Source

fn is_negative(&self) -> bool

Source

fn is_positive(&self) -> bool

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

Source§

const MIN: i8 = -128i8

Source§

const MAX: i8 = 127i8

Source§

const MIN_INT: i8 = -128i8

Source§

const MAX_INT: i8 = 127i8

Source§

fn is_zero(&self) -> bool

Source§

fn is_negative(&self) -> bool

Source§

fn is_positive(&self) -> bool

Source§

impl InherentLimits<i16> for i16

Source§

const MIN: i16 = -32_768i16

Source§

const MAX: i16 = 32_767i16

Source§

const MIN_INT: i16 = -32_768i16

Source§

const MAX_INT: i16 = 32_767i16

Source§

fn is_zero(&self) -> bool

Source§

fn is_negative(&self) -> bool

Source§

fn is_positive(&self) -> bool

Source§

impl InherentLimits<i32> for i32

Source§

const MIN: i32 = -2_147_483_648i32

Source§

const MAX: i32 = 2_147_483_647i32

Source§

const MIN_INT: i32 = -2_147_483_648i32

Source§

const MAX_INT: i32 = 2_147_483_647i32

Source§

fn is_zero(&self) -> bool

Source§

fn is_negative(&self) -> bool

Source§

fn is_positive(&self) -> bool

Source§

impl InherentLimits<i64> for i64

Source§

const MIN: i64 = -9_223_372_036_854_775_808i64

Source§

const MAX: i64 = 9_223_372_036_854_775_807i64

Source§

const MIN_INT: i64 = -9_223_372_036_854_775_808i64

Source§

const MAX_INT: i64 = 9_223_372_036_854_775_807i64

Source§

fn is_zero(&self) -> bool

Source§

fn is_negative(&self) -> bool

Source§

fn is_positive(&self) -> bool

Source§

impl InherentLimits<i128> for i128

Source§

const MIN: i128 = -170_141_183_460_469_231_731_687_303_715_884_105_728i128

Source§

const MAX: i128 = 170_141_183_460_469_231_731_687_303_715_884_105_727i128

Source§

const MIN_INT: i128 = -170_141_183_460_469_231_731_687_303_715_884_105_728i128

Source§

const MAX_INT: i128 = 170_141_183_460_469_231_731_687_303_715_884_105_727i128

Source§

fn is_zero(&self) -> bool

Source§

fn is_negative(&self) -> bool

Source§

fn is_positive(&self) -> bool

Source§

impl InherentLimits<isize> for isize

Source§

const MIN: isize = -2_147_483_648isize

Source§

const MAX: isize = 2_147_483_647isize

Source§

const MIN_INT: isize = -2_147_483_648isize

Source§

const MAX_INT: isize = 2_147_483_647isize

Source§

fn is_zero(&self) -> bool

Source§

fn is_negative(&self) -> bool

Source§

fn is_positive(&self) -> bool

Source§

impl InherentLimits<u8> for u8

Source§

const MIN: u8 = 0u8

Source§

const MAX: u8 = 255u8

Source§

const MIN_INT: u8 = 0u8

Source§

const MAX_INT: u8 = 255u8

Source§

fn is_zero(&self) -> bool

Source§

fn is_negative(&self) -> bool

Source§

fn is_positive(&self) -> bool

Source§

impl InherentLimits<u16> for u16

Source§

const MIN: u16 = 0u16

Source§

const MAX: u16 = 65_535u16

Source§

const MIN_INT: u16 = 0u16

Source§

const MAX_INT: u16 = 65_535u16

Source§

fn is_zero(&self) -> bool

Source§

fn is_negative(&self) -> bool

Source§

fn is_positive(&self) -> bool

Source§

impl InherentLimits<u32> for u32

Source§

const MIN: u32 = 0u32

Source§

const MAX: u32 = 4_294_967_295u32

Source§

const MIN_INT: u32 = 0u32

Source§

const MAX_INT: u32 = 4_294_967_295u32

Source§

fn is_zero(&self) -> bool

Source§

fn is_negative(&self) -> bool

Source§

fn is_positive(&self) -> bool

Source§

impl InherentLimits<u64> for u64

Source§

const MIN: u64 = 0u64

Source§

const MAX: u64 = 18_446_744_073_709_551_615u64

Source§

const MIN_INT: u64 = 0u64

Source§

const MAX_INT: u64 = 18_446_744_073_709_551_615u64

Source§

fn is_zero(&self) -> bool

Source§

fn is_negative(&self) -> bool

Source§

fn is_positive(&self) -> bool

Source§

impl InherentLimits<u128> for u128

Source§

const MIN: u128 = 0u128

Source§

const MAX: u128 = 340_282_366_920_938_463_463_374_607_431_768_211_455u128

Source§

const MIN_INT: u128 = 0u128

Source§

const MAX_INT: u128 = 340_282_366_920_938_463_463_374_607_431_768_211_455u128

Source§

fn is_zero(&self) -> bool

Source§

fn is_negative(&self) -> bool

Source§

fn is_positive(&self) -> bool

Source§

impl InherentLimits<usize> for usize

Source§

const MIN: usize = 0usize

Source§

const MAX: usize = 4_294_967_295usize

Source§

const MIN_INT: usize = 0usize

Source§

const MAX_INT: usize = 4_294_967_295usize

Source§

fn is_zero(&self) -> bool

Source§

fn is_negative(&self) -> bool

Source§

fn is_positive(&self) -> bool

Implementors§