Skip to main content

NumericOps

Trait NumericOps 

Source
pub trait NumericOps {
Show 21 methods // Required methods fn new(num: i64) -> Self where Self: Sized; fn new_f64(num: f64) -> Self where Self: Sized; fn value_of(self) -> i64; fn register_type(&self) -> RegisterType; // Provided methods fn unit(&self) -> Option<&'static str> { ... } fn value_f64(self) -> f64 where Self: Sized { ... } fn pt_value(self, prec: Option<u8>) -> f64 where Self: Sized { ... } fn px_value(self, prec: Option<u8>) -> f64 where Self: Sized { ... } fn absolute(self) -> Self where Self: Sized { ... } fn sign(self) -> i8 where Self: Sized { ... } fn negate(self) -> Self where Self: Sized { ... } fn add<T: NumericOps>(self, other: T) -> Self where Self: Sized { ... } fn subtract<T: NumericOps>(self, other: T) -> Self where Self: Sized { ... } fn multiply<T: NumericOps>(self, other: T) -> Self where Self: Sized { ... } fn divide<T: NumericOps>(self, other: T) -> Self where Self: Sized { ... } fn divideround<T: NumericOps>(self, other: T) -> Self where Self: Sized { ... } fn smaller<T: NumericOps>(self, other: T) -> Self where Self: Sized { ... } fn larger<T: NumericOps>(self, other: T) -> Self where Self: Sized { ... } fn to_token(self) -> Token where Self: Sized { ... } fn into_glue_type(self) -> Glue where Self: Sized { ... } fn to_attribute(&self) -> String where Self: Display { ... }
}

Required Methods§

Source

fn new(num: i64) -> Self
where Self: Sized,

Source

fn new_f64(num: f64) -> Self
where Self: Sized,

Source

fn value_of(self) -> i64

Source

fn register_type(&self) -> RegisterType

Provided Methods§

Source

fn unit(&self) -> Option<&'static str>

Source

fn value_f64(self) -> f64
where Self: Sized,

Source

fn pt_value(self, prec: Option<u8>) -> f64
where Self: Sized,

Source

fn px_value(self, prec: Option<u8>) -> f64
where Self: Sized,

Source

fn absolute(self) -> Self
where Self: Sized,

Source

fn sign(self) -> i8
where Self: Sized,

Source

fn negate(self) -> Self
where Self: Sized,

Source

fn add<T: NumericOps>(self, other: T) -> Self
where Self: Sized,

Source

fn subtract<T: NumericOps>(self, other: T) -> Self
where Self: Sized,

Source

fn multiply<T: NumericOps>(self, other: T) -> Self
where Self: Sized,

Source

fn divide<T: NumericOps>(self, other: T) -> Self
where Self: Sized,

Truncating division

Source

fn divideround<T: NumericOps>(self, other: T) -> Self
where Self: Sized,

Rounding division

Source

fn smaller<T: NumericOps>(self, other: T) -> Self
where Self: Sized,

Source

fn larger<T: NumericOps>(self, other: T) -> Self
where Self: Sized,

Source

fn to_token(self) -> Token
where Self: Sized,

Source

fn into_glue_type(self) -> Glue
where Self: Sized,

Source

fn to_attribute(&self) -> String
where Self: Display,

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§