[][src]Trait mathru::algebra::abstr::cast::ToPrimitive

pub trait ToPrimitive {
    pub fn to_i64(&self) -> i64;
pub fn to_i128(&self) -> i128;
pub fn to_u64(&self) -> u64;
pub fn to_u128(&self) -> u128;
pub fn to_f64(&self) -> f64; pub fn to_i8(&self) -> i8 { ... }
pub fn to_i16(&self) -> i16 { ... }
pub fn to_i32(&self) -> i32 { ... }
pub fn to_u8(&self) -> u8 { ... }
pub fn to_u16(&self) -> u16 { ... }
pub fn to_u32(&self) -> u32 { ... }
pub fn to_f32(&self) -> f32 { ... } }

A generic trait for converting a value to a number.

Required methods

pub fn to_i64(&self) -> i64[src]

Converts the value of self to an i64.

pub fn to_i128(&self) -> i128[src]

Converts the value of self to an i128.

pub fn to_u64(&self) -> u64[src]

Converts the value of self to an u64.

pub fn to_u128(&self) -> u128[src]

Converts the value of self to an u128.

pub fn to_f64(&self) -> f64[src]

Converts the value of self to an f64.

Loading content...

Provided methods

pub fn to_i8(&self) -> i8[src]

Converts the value of self to an i8.

pub fn to_i16(&self) -> i16[src]

Converts the value of self to an i16.

pub fn to_i32(&self) -> i32[src]

Converts the value of self to an i32.

pub fn to_u8(&self) -> u8[src]

Converts the value of self to an u8.

pub fn to_u16(&self) -> u16[src]

Converts the value of self to an u16.

pub fn to_u32(&self) -> u32[src]

Converts the value of self to an u32.

pub fn to_f32(&self) -> f32[src]

Converts the value of self to an f32.

Loading content...

Implementations on Foreign Types

impl ToPrimitive for i8[src]

impl ToPrimitive for i16[src]

impl ToPrimitive for i32[src]

impl ToPrimitive for i64[src]

impl ToPrimitive for i128[src]

impl ToPrimitive for u8[src]

impl ToPrimitive for u16[src]

impl ToPrimitive for u32[src]

impl ToPrimitive for u64[src]

impl ToPrimitive for u128[src]

impl ToPrimitive for f32[src]

impl ToPrimitive for f64[src]

Loading content...

Implementors

Loading content...