pub trait ToPrimitive {
// Required methods
fn to_i64(&self) -> Option<i64>;
fn to_u64(&self) -> Option<u64>;
// Provided methods
fn to_isize(&self) -> Option<isize> { ... }
fn to_i8(&self) -> Option<i8> { ... }
fn to_i16(&self) -> Option<i16> { ... }
fn to_i32(&self) -> Option<i32> { ... }
fn to_usize(&self) -> Option<usize> { ... }
fn to_u8(&self) -> Option<u8> { ... }
fn to_u16(&self) -> Option<u16> { ... }
fn to_u32(&self) -> Option<u32> { ... }
}
Expand description
A generic trait for converting a value to a number.