pub trait Bounds: PartialOrd<Self> + Display {
    const MIN: Self;
    const MAX: Self;

    // Required method
    fn validate_bounds(
        &self,
        lower_bound: &Self,
        upper_bound: &Self
    ) -> Result<(), OutOfBounds>;
}

Required Associated Constants§

source

const MIN: Self

source

const MAX: Self

Required Methods§

source

fn validate_bounds( &self, lower_bound: &Self, upper_bound: &Self ) -> Result<(), OutOfBounds>

Implementations on Foreign Types§

source§

impl Bounds for i32

source§

const MIN: i32 = -2_147_483_648i32

source§

const MAX: i32 = 2_147_483_647i32

source§

fn validate_bounds( &self, lower_bound: &i32, upper_bound: &i32 ) -> Result<(), OutOfBounds>

source§

impl Bounds 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§

fn validate_bounds( &self, lower_bound: &i128, upper_bound: &i128 ) -> Result<(), OutOfBounds>

source§

impl Bounds for u16

source§

const MIN: u16 = 0u16

source§

const MAX: u16 = 65_535u16

source§

fn validate_bounds( &self, lower_bound: &u16, upper_bound: &u16 ) -> Result<(), OutOfBounds>

source§

impl Bounds for u8

source§

const MIN: u8 = 0u8

source§

const MAX: u8 = 255u8

source§

fn validate_bounds( &self, lower_bound: &u8, upper_bound: &u8 ) -> Result<(), OutOfBounds>

source§

impl Bounds for i8

source§

const MIN: i8 = -128i8

source§

const MAX: i8 = 127i8

source§

fn validate_bounds( &self, lower_bound: &i8, upper_bound: &i8 ) -> Result<(), OutOfBounds>

source§

impl Bounds for i16

source§

const MIN: i16 = -32_768i16

source§

const MAX: i16 = 32_767i16

source§

fn validate_bounds( &self, lower_bound: &i16, upper_bound: &i16 ) -> Result<(), OutOfBounds>

source§

impl Bounds 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§

fn validate_bounds( &self, lower_bound: &i64, upper_bound: &i64 ) -> Result<(), OutOfBounds>

source§

impl Bounds for isize

source§

const MIN: isize = -9_223_372_036_854_775_808isize

source§

const MAX: isize = 9_223_372_036_854_775_807isize

source§

fn validate_bounds( &self, lower_bound: &isize, upper_bound: &isize ) -> Result<(), OutOfBounds>

source§

impl Bounds for u32

source§

const MIN: u32 = 0u32

source§

const MAX: u32 = 4_294_967_295u32

source§

fn validate_bounds( &self, lower_bound: &u32, upper_bound: &u32 ) -> Result<(), OutOfBounds>

source§

impl Bounds 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§

fn validate_bounds( &self, lower_bound: &u128, upper_bound: &u128 ) -> Result<(), OutOfBounds>

source§

impl Bounds for usize

source§

const MIN: usize = 0usize

source§

const MAX: usize = 18_446_744_073_709_551_615usize

source§

fn validate_bounds( &self, lower_bound: &usize, upper_bound: &usize ) -> Result<(), OutOfBounds>

source§

impl Bounds for u64

source§

const MIN: u64 = 0u64

source§

const MAX: u64 = 18_446_744_073_709_551_615u64

source§

fn validate_bounds( &self, lower_bound: &u64, upper_bound: &u64 ) -> Result<(), OutOfBounds>

Implementors§