Skip to main content

Primitive

Trait Primitive 

pub trait Primitive:
    Sized
    + Sealed
    + Copy
    + Clone
    + PartialEq
    + PartialOrd
    + Default {
    const ZERO: Self;
    const ONE: Self;

    // Required method
    fn into_f64(self) -> f64;
}

Required Associated Constants§

const ZERO: Self

const ONE: Self

Required Methods§

fn into_f64(self) -> f64

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

§

impl Primitive for bool

§

const ZERO: bool = false

§

const ONE: bool = true

§

fn into_f64(self) -> f64

§

impl Primitive for char

§

const ZERO: char

§

const ONE: char

§

fn into_f64(self) -> f64

§

impl Primitive for f32

§

const ZERO: f32 = 0_f32

§

const ONE: f32 = 1_f32

§

fn into_f64(self) -> f64

§

impl Primitive for f64

§

const ZERO: f64 = 0_f64

§

const ONE: f64 = 1_f64

§

fn into_f64(self) -> f64

§

impl Primitive for i8

§

const ZERO: i8 = 0_i8

§

const ONE: i8 = 1_i8

§

fn into_f64(self) -> f64

§

impl Primitive for i16

§

const ZERO: i16 = 0_i16

§

const ONE: i16 = 1_i16

§

fn into_f64(self) -> f64

§

impl Primitive for i32

§

const ZERO: i32 = 0_i32

§

const ONE: i32 = 1_i32

§

fn into_f64(self) -> f64

§

impl Primitive for i64

§

const ZERO: i64 = 0_i64

§

const ONE: i64 = 1_i64

§

fn into_f64(self) -> f64

§

impl Primitive for i128

§

const ZERO: i128 = 0_i128

§

const ONE: i128 = 1_i128

§

fn into_f64(self) -> f64

§

impl Primitive for isize

§

const ZERO: isize = 0_isize

§

const ONE: isize = 1_isize

§

fn into_f64(self) -> f64

§

impl Primitive for u8

§

const ZERO: u8 = 0_u8

§

const ONE: u8 = 1_u8

§

fn into_f64(self) -> f64

§

impl Primitive for u16

§

const ZERO: u16 = 0_u16

§

const ONE: u16 = 1_u16

§

fn into_f64(self) -> f64

§

impl Primitive for u32

§

const ZERO: u32 = 0_u32

§

const ONE: u32 = 1_u32

§

fn into_f64(self) -> f64

§

impl Primitive for u64

§

const ZERO: u64 = 0_u64

§

const ONE: u64 = 1_u64

§

fn into_f64(self) -> f64

§

impl Primitive for u128

§

const ZERO: u128 = 0_u128

§

const ONE: u128 = 1_u128

§

fn into_f64(self) -> f64

§

impl Primitive for usize

§

const ZERO: usize = 0_usize

§

const ONE: usize = 1_usize

§

fn into_f64(self) -> f64

Implementors§