pub trait IntConv: Sized {
Show 48 methods
// Required methods
fn qck_f32(self) -> f32;
fn qck_f64(self) -> f64;
fn qck_i8(self) -> i8;
fn qck_i16(self) -> i16;
fn qck_i32(self) -> i32;
fn qck_i64(self) -> i64;
fn qck_i128(self) -> i128;
fn qck_isize(self) -> isize;
fn qck_u8(self) -> u8;
fn qck_u16(self) -> u16;
fn qck_u32(self) -> u32;
fn qck_u64(self) -> u64;
fn qck_u128(self) -> u128;
fn qck_usize(self) -> usize;
fn from_char(val: char) -> NumResult<Self>;
fn from_u8(val: u8) -> NumResult<Self>;
fn from_usize(val: usize) -> NumResult<Self>;
fn from_isize(val: isize) -> NumResult<Self>;
fn to_i8(self) -> NumResult<i8>;
fn to_i16(self) -> NumResult<i16>;
fn to_i32(self) -> NumResult<i32>;
fn to_i64(self) -> NumResult<i64>;
fn to_i128(self) -> NumResult<i128>;
fn to_isize(self) -> NumResult<isize>;
fn to_u8(self) -> NumResult<u8>;
fn to_u16(self) -> NumResult<u16>;
fn to_u32(self) -> NumResult<u32>;
fn to_u64(self) -> NumResult<u64>;
fn to_u128(self) -> NumResult<u128>;
fn to_usize(self) -> NumResult<usize>;
fn to_char(self) -> NumResult<char>;
// Provided methods
fn pan_f32(self) -> f32 { ... }
fn pan_f64(self) -> f64 { ... }
fn pan_i8(self) -> i8 { ... }
fn pan_i16(self) -> i16 { ... }
fn pan_i32(self) -> i32 { ... }
fn pan_i64(self) -> i64 { ... }
fn pan_i128(self) -> i128 { ... }
fn pan_isize(self) -> isize { ... }
fn pan_u8(self) -> u8 { ... }
fn pan_u16(self) -> u16 { ... }
fn pan_u32(self) -> u32 { ... }
fn pan_u64(self) -> u64 { ... }
fn pan_u128(self) -> u128 { ... }
fn pan_usize(self) -> usize { ... }
fn pan_char(self) -> char { ... }
fn to_f32(self) -> NumResult<f32> { ... }
fn to_f64(self) -> NumResult<f64> { ... }
}
Safely convert from usize
Returns Err (Overflow)
if the result can’t be represented
Safely convert to i8
Returns Err (Overflow)
if the result can’t be represented
Safely convert to i16
Returns Err (Overflow)
if the result can’t be represented
Safely convert to i32
Returns Err (Overflow)
if the result can’t be represented
Safely convert to i64
Returns Err (Overflow)
if the result can’t be represented
Safely convert to i128
Returns Err (Overflow)
if the result can’t be represented
Safely convert to isize
Returns Err (Overflow)
if the result can’t be represented
Safely convert to u8
Returns Err (Overflow)
if the result can’t be represented
Safely convert to u16
Returns Err (Overflow)
if the result can’t be represented
Safely convert to u32
Returns Err (Overflow)
if the result can’t be represented
Safely convert to u64
Returns Err (Overflow)
if the result can’t be represented
Safely convert to u128
Returns Err (Overflow)
if the result can’t be represented
Safely convert to usize
Returns Err (Overflow)
if the result can’t be represented
Safely convert to f32
Returns Err (Overflow)
if the result can’t be represented
Safely convert to f64
Returns Err (Overflow)
if the result can’t be represented