Trait MinMax

Source
pub trait MinMax {
    const MAX: Self;
    const MIN: Self;

    // Required methods
    fn max(self, rhs: Self) -> Self;
    fn min(self, lhs: Self) -> Self;
}
Expand description

This trait is a min and max trait that is implemented for all types supported by TensorType

Required Associated Constants§

Source

const MAX: Self

Source

const MIN: Self

Required Methods§

Source

fn max(self, rhs: Self) -> Self

Source

fn min(self, lhs: 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 MinMax for f32

Source§

const MAX: Self = 3.40282347E+38f32

Source§

const MIN: Self = -3.40282347E+38f32

Source§

fn min(self, rhs: Self) -> Self

Source§

fn max(self, rhs: Self) -> Self

Source§

impl MinMax for f64

Source§

const MAX: Self = 1.7976931348623157E+308f64

Source§

const MIN: Self = -1.7976931348623157E+308f64

Source§

fn min(self, rhs: Self) -> Self

Source§

fn max(self, rhs: Self) -> Self

Source§

impl MinMax for i8

Source§

const MAX: Self = 127i8

Source§

const MIN: Self = -128i8

Source§

fn min(self, rhs: Self) -> Self

Source§

fn max(self, rhs: Self) -> Self

Source§

impl MinMax for i16

Source§

const MAX: Self = 32_767i16

Source§

const MIN: Self = -32_768i16

Source§

fn min(self, rhs: Self) -> Self

Source§

fn max(self, rhs: Self) -> Self

Source§

impl MinMax for i32

Source§

const MAX: Self = 2_147_483_647i32

Source§

const MIN: Self = -2_147_483_648i32

Source§

fn min(self, rhs: Self) -> Self

Source§

fn max(self, rhs: Self) -> Self

Source§

impl MinMax for i64

Source§

const MAX: Self = 9_223_372_036_854_775_807i64

Source§

const MIN: Self = -9_223_372_036_854_775_808i64

Source§

fn min(self, rhs: Self) -> Self

Source§

fn max(self, rhs: Self) -> Self

Source§

impl MinMax for u8

Source§

const MAX: Self = 255u8

Source§

const MIN: Self = 0u8

Source§

fn min(self, rhs: Self) -> Self

Source§

fn max(self, rhs: Self) -> Self

Source§

impl MinMax for u16

Source§

const MAX: Self = 65_535u16

Source§

const MIN: Self = 0u16

Source§

fn min(self, rhs: Self) -> Self

Source§

fn max(self, rhs: Self) -> Self

Source§

impl MinMax for u32

Source§

const MAX: Self = 4_294_967_295u32

Source§

const MIN: Self = 0u32

Source§

fn min(self, rhs: Self) -> Self

Source§

fn max(self, rhs: Self) -> Self

Source§

impl MinMax for u64

Source§

const MAX: Self = 18_446_744_073_709_551_615u64

Source§

const MIN: Self = 0u64

Source§

fn min(self, rhs: Self) -> Self

Source§

fn max(self, rhs: Self) -> Self

Implementors§