Skip to main content

Primitive

Trait Primitive 

Source
pub trait Primitive<U>:
    Sized
    + Copy
    + Send
    + Sync
    + One
    + Debug
    + Sum
    + Default
    + Sub<Self, Output = Self>
    + Add<Self, Output = Self>
    + AddAssign
    + MulAssign
    + SubAssign
    + DivAssign
    + PartialOrd
    + Mul<Self, Output = Self>
    + Div<Self, Output = Self>
    + MaxMin {
    // Required methods
    fn convert(self) -> U;
    fn reverse(other: U) -> Self;
}

Required Methods§

Source

fn convert(self) -> U

Source

fn reverse(other: U) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Primitive<bool> for f32

Source§

fn convert(self) -> bool

Source§

fn reverse(other: bool) -> Self

Source§

impl Primitive<bool> for f64

Source§

fn convert(self) -> bool

Source§

fn reverse(other: bool) -> Self

Source§

impl Primitive<bool> for u8

Source§

fn convert(self) -> bool

Source§

fn reverse(other: bool) -> Self

Source§

impl Primitive<bool> for u16

Source§

fn convert(self) -> bool

Source§

fn reverse(other: bool) -> Self

Source§

impl Primitive<bool> for u32

Source§

fn convert(self) -> bool

Source§

fn reverse(other: bool) -> Self

Source§

impl Primitive<bool> for u64

Source§

fn convert(self) -> bool

Source§

fn reverse(other: bool) -> Self

Source§

impl Primitive<bool> for u128

Source§

fn convert(self) -> bool

Source§

fn reverse(other: bool) -> Self

Source§

impl Primitive<bool> for usize

Source§

fn convert(self) -> bool

Source§

fn reverse(other: bool) -> Self

Source§

impl Primitive<f32> for f32

Source§

fn convert(self) -> f32

Source§

fn reverse(other: f32) -> Self

Source§

impl Primitive<f32> for f64

Source§

fn convert(self) -> f32

Source§

fn reverse(other: f32) -> Self

Source§

impl Primitive<f32> for u8

Source§

fn convert(self) -> f32

Source§

fn reverse(other: f32) -> Self

Source§

impl Primitive<f32> for u16

Source§

fn convert(self) -> f32

Source§

fn reverse(other: f32) -> Self

Source§

impl Primitive<f32> for u32

Source§

fn convert(self) -> f32

Source§

fn reverse(other: f32) -> Self

Source§

impl Primitive<f32> for u64

Source§

fn convert(self) -> f32

Source§

fn reverse(other: f32) -> Self

Source§

impl Primitive<f32> for u128

Source§

fn convert(self) -> f32

Source§

fn reverse(other: f32) -> Self

Source§

impl Primitive<f32> for usize

Source§

fn convert(self) -> f32

Source§

fn reverse(other: f32) -> Self

Source§

impl Primitive<f64> for f32

Source§

fn convert(self) -> f64

Source§

fn reverse(other: f64) -> Self

Source§

impl Primitive<f64> for f64

Source§

fn convert(self) -> f64

Source§

fn reverse(other: f64) -> Self

Source§

impl Primitive<f64> for u8

Source§

fn convert(self) -> f64

Source§

fn reverse(other: f64) -> Self

Source§

impl Primitive<f64> for u16

Source§

fn convert(self) -> f64

Source§

fn reverse(other: f64) -> Self

Source§

impl Primitive<f64> for u32

Source§

fn convert(self) -> f64

Source§

fn reverse(other: f64) -> Self

Source§

impl Primitive<f64> for u64

Source§

fn convert(self) -> f64

Source§

fn reverse(other: f64) -> Self

Source§

impl Primitive<f64> for u128

Source§

fn convert(self) -> f64

Source§

fn reverse(other: f64) -> Self

Source§

impl Primitive<f64> for usize

Source§

fn convert(self) -> f64

Source§

fn reverse(other: f64) -> Self

Source§

impl Primitive<u8> for f32

Source§

fn convert(self) -> u8

Source§

fn reverse(other: u8) -> Self

Source§

impl Primitive<u8> for f64

Source§

fn convert(self) -> u8

Source§

fn reverse(other: u8) -> Self

Source§

impl Primitive<u8> for u16

Source§

fn convert(self) -> u8

Source§

fn reverse(other: u8) -> Self

Source§

impl Primitive<u8> for u32

Source§

fn convert(self) -> u8

Source§

fn reverse(other: u8) -> Self

Source§

impl Primitive<u8> for u64

Source§

fn convert(self) -> u8

Source§

fn reverse(other: u8) -> Self

Source§

impl Primitive<u8> for u128

Source§

fn convert(self) -> u8

Source§

fn reverse(other: u8) -> Self

Source§

impl Primitive<u8> for usize

Source§

fn convert(self) -> u8

Source§

fn reverse(other: u8) -> Self

Source§

impl Primitive<u16> for f32

Source§

fn convert(self) -> u16

Source§

fn reverse(other: u16) -> Self

Source§

impl Primitive<u16> for f64

Source§

fn convert(self) -> u16

Source§

fn reverse(other: u16) -> Self

Source§

impl Primitive<u16> for u8

Source§

fn convert(self) -> u16

Source§

fn reverse(other: u16) -> Self

Source§

impl Primitive<u16> for u32

Source§

fn convert(self) -> u16

Source§

fn reverse(other: u16) -> Self

Source§

impl Primitive<u16> for u64

Source§

fn convert(self) -> u16

Source§

fn reverse(other: u16) -> Self

Source§

impl Primitive<u16> for u128

Source§

fn convert(self) -> u16

Source§

fn reverse(other: u16) -> Self

Source§

impl Primitive<u16> for usize

Source§

fn convert(self) -> u16

Source§

fn reverse(other: u16) -> Self

Source§

impl Primitive<u32> for f32

Source§

fn convert(self) -> u32

Source§

fn reverse(other: u32) -> Self

Source§

impl Primitive<u32> for f64

Source§

fn convert(self) -> u32

Source§

fn reverse(other: u32) -> Self

Source§

impl Primitive<u32> for u8

Source§

fn convert(self) -> u32

Source§

fn reverse(other: u32) -> Self

Source§

impl Primitive<u32> for u16

Source§

fn convert(self) -> u32

Source§

fn reverse(other: u32) -> Self

Source§

impl Primitive<u32> for u64

Source§

fn convert(self) -> u32

Source§

fn reverse(other: u32) -> Self

Source§

impl Primitive<u32> for u128

Source§

fn convert(self) -> u32

Source§

fn reverse(other: u32) -> Self

Source§

impl Primitive<u32> for usize

Source§

fn convert(self) -> u32

Source§

fn reverse(other: u32) -> Self

Source§

impl Primitive<u64> for f32

Source§

fn convert(self) -> u64

Source§

fn reverse(other: u64) -> Self

Source§

impl Primitive<u64> for f64

Source§

fn convert(self) -> u64

Source§

fn reverse(other: u64) -> Self

Source§

impl Primitive<u64> for u8

Source§

fn convert(self) -> u64

Source§

fn reverse(other: u64) -> Self

Source§

impl Primitive<u64> for u16

Source§

fn convert(self) -> u64

Source§

fn reverse(other: u64) -> Self

Source§

impl Primitive<u64> for u32

Source§

fn convert(self) -> u64

Source§

fn reverse(other: u64) -> Self

Source§

impl Primitive<u64> for u128

Source§

fn convert(self) -> u64

Source§

fn reverse(other: u64) -> Self

Source§

impl Primitive<u64> for usize

Source§

fn convert(self) -> u64

Source§

fn reverse(other: u64) -> Self

Source§

impl Primitive<u128> for f32

Source§

fn convert(self) -> u128

Source§

fn reverse(other: u128) -> Self

Source§

impl Primitive<u128> for f64

Source§

fn convert(self) -> u128

Source§

fn reverse(other: u128) -> Self

Source§

impl Primitive<u128> for u8

Source§

fn convert(self) -> u128

Source§

fn reverse(other: u128) -> Self

Source§

impl Primitive<u128> for u16

Source§

fn convert(self) -> u128

Source§

fn reverse(other: u128) -> Self

Source§

impl Primitive<u128> for u32

Source§

fn convert(self) -> u128

Source§

fn reverse(other: u128) -> Self

Source§

impl Primitive<u128> for u64

Source§

fn convert(self) -> u128

Source§

fn reverse(other: u128) -> Self

Source§

impl Primitive<u128> for usize

Source§

fn convert(self) -> u128

Source§

fn reverse(other: u128) -> Self

Source§

impl Primitive<usize> for f32

Source§

fn convert(self) -> usize

Source§

fn reverse(other: usize) -> Self

Source§

impl Primitive<usize> for f64

Source§

fn convert(self) -> usize

Source§

fn reverse(other: usize) -> Self

Source§

impl Primitive<usize> for u8

Source§

fn convert(self) -> usize

Source§

fn reverse(other: usize) -> Self

Source§

impl Primitive<usize> for u16

Source§

fn convert(self) -> usize

Source§

fn reverse(other: usize) -> Self

Source§

impl Primitive<usize> for u32

Source§

fn convert(self) -> usize

Source§

fn reverse(other: usize) -> Self

Source§

impl Primitive<usize> for u64

Source§

fn convert(self) -> usize

Source§

fn reverse(other: usize) -> Self

Source§

impl Primitive<usize> for u128

Source§

fn convert(self) -> usize

Source§

fn reverse(other: usize) -> Self

Source§

impl Primitive<usize> for usize

Source§

fn convert(self) -> usize

Source§

fn reverse(other: usize) -> Self

Implementors§