Trait BoundedMeasure

Source
pub trait BoundedMeasure: Measure + Sub<Output = Self> {
    // Required methods
    fn min() -> Self;
    fn max() -> Self;
    fn overflowing_add(self, rhs: Self) -> (Self, bool);
    fn from_f32(val: f32) -> Self;
    fn from_f64(val: f64) -> Self;
}

Required Methods§

Source

fn min() -> Self

Source

fn max() -> Self

Source

fn overflowing_add(self, rhs: Self) -> (Self, bool)

Source

fn from_f32(val: f32) -> Self

Source

fn from_f64(val: f64) -> 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 BoundedMeasure for f32

Source§

fn min() -> f32

Source§

fn max() -> f32

Source§

fn overflowing_add(self, rhs: f32) -> (f32, bool)

Source§

fn from_f32(val: f32) -> f32

Source§

fn from_f64(val: f64) -> f32

Source§

impl BoundedMeasure for f64

Source§

fn min() -> f64

Source§

fn max() -> f64

Source§

fn overflowing_add(self, rhs: f64) -> (f64, bool)

Source§

fn from_f32(val: f32) -> f64

Source§

fn from_f64(val: f64) -> f64

Source§

impl BoundedMeasure for i8

Source§

fn min() -> i8

Source§

fn max() -> i8

Source§

fn overflowing_add(self, rhs: i8) -> (i8, bool)

Source§

fn from_f32(val: f32) -> i8

Source§

fn from_f64(val: f64) -> i8

Source§

impl BoundedMeasure for i16

Source§

fn min() -> i16

Source§

fn max() -> i16

Source§

fn overflowing_add(self, rhs: i16) -> (i16, bool)

Source§

fn from_f32(val: f32) -> i16

Source§

fn from_f64(val: f64) -> i16

Source§

impl BoundedMeasure for i32

Source§

fn min() -> i32

Source§

fn max() -> i32

Source§

fn overflowing_add(self, rhs: i32) -> (i32, bool)

Source§

fn from_f32(val: f32) -> i32

Source§

fn from_f64(val: f64) -> i32

Source§

impl BoundedMeasure for i64

Source§

fn min() -> i64

Source§

fn max() -> i64

Source§

fn overflowing_add(self, rhs: i64) -> (i64, bool)

Source§

fn from_f32(val: f32) -> i64

Source§

fn from_f64(val: f64) -> i64

Source§

impl BoundedMeasure for i128

Source§

impl BoundedMeasure for isize

Source§

impl BoundedMeasure for u8

Source§

fn min() -> u8

Source§

fn max() -> u8

Source§

fn overflowing_add(self, rhs: u8) -> (u8, bool)

Source§

fn from_f32(val: f32) -> u8

Source§

fn from_f64(val: f64) -> u8

Source§

impl BoundedMeasure for u16

Source§

fn min() -> u16

Source§

fn max() -> u16

Source§

fn overflowing_add(self, rhs: u16) -> (u16, bool)

Source§

fn from_f32(val: f32) -> u16

Source§

fn from_f64(val: f64) -> u16

Source§

impl BoundedMeasure for u32

Source§

fn min() -> u32

Source§

fn max() -> u32

Source§

fn overflowing_add(self, rhs: u32) -> (u32, bool)

Source§

fn from_f32(val: f32) -> u32

Source§

fn from_f64(val: f64) -> u32

Source§

impl BoundedMeasure for u64

Source§

fn min() -> u64

Source§

fn max() -> u64

Source§

fn overflowing_add(self, rhs: u64) -> (u64, bool)

Source§

fn from_f32(val: f32) -> u64

Source§

fn from_f64(val: f64) -> u64

Source§

impl BoundedMeasure for u128

Source§

impl BoundedMeasure for usize

Implementors§