Trait number_traits::ToPrimitive
[−]
[src]
pub trait ToPrimitive { fn to_usize(&self) -> usize; fn to_u8(&self) -> u8; fn to_u16(&self) -> u16; fn to_u32(&self) -> u32; fn to_u64(&self) -> u64; fn to_u128(&self) -> u128; fn to_isize(&self) -> isize; fn to_i8(&self) -> i8; fn to_i16(&self) -> i16; fn to_i32(&self) -> i32; fn to_i64(&self) -> i64; fn to_i128(&self) -> i128; fn to_f32(&self) -> f32; fn to_f64(&self) -> f64; fn to_bool(&self) -> bool { ... } }
Required Methods
fn to_usize(&self) -> usize
fn to_u8(&self) -> u8
fn to_u16(&self) -> u16
fn to_u32(&self) -> u32
fn to_u64(&self) -> u64
fn to_u128(&self) -> u128
fn to_isize(&self) -> isize
fn to_i8(&self) -> i8
fn to_i16(&self) -> i16
fn to_i32(&self) -> i32
fn to_i64(&self) -> i64
fn to_i128(&self) -> i128
fn to_f32(&self) -> f32
fn to_f64(&self) -> f64
Provided Methods
fn to_bool(&self) -> bool
Implementations on Foreign Types
impl<T> ToPrimitive for Wrapping<T> where
T: ToPrimitive,
[src]
T: ToPrimitive,
fn to_bool(&self) -> bool
[src]
fn to_usize(&self) -> usize
[src]
fn to_u8(&self) -> u8
[src]
fn to_u16(&self) -> u16
[src]
fn to_u32(&self) -> u32
[src]
fn to_u64(&self) -> u64
[src]
fn to_u128(&self) -> u128
[src]
fn to_isize(&self) -> isize
[src]
fn to_i8(&self) -> i8
[src]
fn to_i16(&self) -> i16
[src]
fn to_i32(&self) -> i32
[src]
fn to_i64(&self) -> i64
[src]
fn to_i128(&self) -> i128
[src]
fn to_f32(&self) -> f32
[src]
fn to_f64(&self) -> f64
[src]
Implementors
impl ToPrimitive for usize
impl ToPrimitive for u8
impl ToPrimitive for u16
impl ToPrimitive for u32
impl ToPrimitive for u64
impl ToPrimitive for u128
impl ToPrimitive for isize
impl ToPrimitive for i8
impl ToPrimitive for i16
impl ToPrimitive for i32
impl ToPrimitive for i64
impl ToPrimitive for i128
impl ToPrimitive for f32
impl ToPrimitive for f64