Trait From
Other items incast
pub trait From<Src> { type Output; fn cast(_: Src) -> Self::Output; }
The “cast from” operation
type Output
The result of the cast operation: either Self or Result<Self, Error>
Self
Result<Self, Error>
fn cast(_: Src) -> Self::Output
Checked cast from Src to Self
Src
impl From<i8> for f32
type Output = f32
fn cast(src: i8) -> f32
impl From<i8> for f64
type Output = f64
fn cast(src: i8) -> f64
impl From<i8> for i8
type Output = i8
fn cast(src: i8) -> i8
impl From<i8> for i16
type Output = i16
fn cast(src: i8) -> i16
impl From<i8> for i32
type Output = i32
fn cast(src: i8) -> i32
impl From<i8> for isize
type Output = isize
fn cast(src: i8) -> isize
impl From<i8> for i64
type Output = i64
fn cast(src: i8) -> i64
impl From<i16> for f32
fn cast(src: i16) -> f32
impl From<i16> for f64
fn cast(src: i16) -> f64
impl From<i16> for i16
fn cast(src: i16) -> i16
impl From<i16> for i32
fn cast(src: i16) -> i32
impl From<i16> for isize
fn cast(src: i16) -> isize
impl From<i16> for i64
fn cast(src: i16) -> i64
impl From<i32> for f32
fn cast(src: i32) -> f32
impl From<i32> for f64
fn cast(src: i32) -> f64
impl From<i32> for i32
fn cast(src: i32) -> i32
impl From<i32> for isize
fn cast(src: i32) -> isize
impl From<i32> for i64
fn cast(src: i32) -> i64
impl From<isize> for f32
fn cast(src: isize) -> f32
impl From<isize> for f64
fn cast(src: isize) -> f64
impl From<isize> for i32
fn cast(src: isize) -> i32
impl From<isize> for isize
fn cast(src: isize) -> isize
impl From<isize> for i64
fn cast(src: isize) -> i64
impl From<i64> for f32
fn cast(src: i64) -> f32
impl From<i64> for f64
fn cast(src: i64) -> f64
impl From<i64> for i64
fn cast(src: i64) -> i64
impl From<i8> for u8
type Output = Result<u8, Error>
fn cast(src: i8) -> Self::Output
impl From<i8> for u16
type Output = Result<u16, Error>
impl From<i8> for u32
type Output = Result<u32, Error>
impl From<i8> for usize
type Output = Result<usize, Error>
impl From<i8> for u64
type Output = Result<u64, Error>
impl From<i16> for u16
fn cast(src: i16) -> Self::Output
impl From<i16> for u32
impl From<i16> for usize
impl From<i16> for u64
impl From<i32> for u32
fn cast(src: i32) -> Self::Output
impl From<i32> for usize
impl From<i32> for u64
impl From<isize> for u32
fn cast(src: isize) -> Self::Output
impl From<isize> for usize
impl From<isize> for u64
impl From<i64> for u64
fn cast(src: i64) -> Self::Output
impl From<i16> for i8
type Output = Result<i8, Error>
impl From<i16> for u8
impl From<i32> for i8
impl From<i32> for i16
type Output = Result<i16, Error>
impl From<i32> for u8
impl From<i32> for u16
impl From<isize> for i8
impl From<isize> for i16
impl From<isize> for u8
impl From<isize> for u16
impl From<i64> for i8
impl From<i64> for i16
impl From<i64> for i32
type Output = Result<i32, Error>
impl From<i64> for isize
type Output = Result<isize, Error>
impl From<i64> for u8
impl From<i64> for u16
impl From<i64> for u32
impl From<i64> for usize
impl From<u8> for f32
fn cast(src: u8) -> f32
impl From<u8> for f64
fn cast(src: u8) -> f64
impl From<u8> for i16
fn cast(src: u8) -> i16
impl From<u8> for i32
fn cast(src: u8) -> i32
impl From<u8> for isize
fn cast(src: u8) -> isize
impl From<u8> for i64
fn cast(src: u8) -> i64
impl From<u8> for u8
type Output = u8
fn cast(src: u8) -> u8
impl From<u8> for u16
type Output = u16
fn cast(src: u8) -> u16
impl From<u8> for u32
type Output = u32
fn cast(src: u8) -> u32
impl From<u8> for usize
type Output = usize
fn cast(src: u8) -> usize
impl From<u8> for u64
type Output = u64
fn cast(src: u8) -> u64
impl From<u16> for f32
fn cast(src: u16) -> f32
impl From<u16> for f64
fn cast(src: u16) -> f64
impl From<u16> for i32
fn cast(src: u16) -> i32
impl From<u16> for isize
fn cast(src: u16) -> isize
impl From<u16> for i64
fn cast(src: u16) -> i64
impl From<u16> for u16
fn cast(src: u16) -> u16
impl From<u16> for u32
fn cast(src: u16) -> u32
impl From<u16> for usize
fn cast(src: u16) -> usize
impl From<u16> for u64
fn cast(src: u16) -> u64
impl From<u32> for f32
fn cast(src: u32) -> f32
impl From<u32> for f64
fn cast(src: u32) -> f64
impl From<u32> for i64
fn cast(src: u32) -> i64
impl From<u32> for u32
fn cast(src: u32) -> u32
impl From<u32> for usize
fn cast(src: u32) -> usize
impl From<u32> for u64
fn cast(src: u32) -> u64
impl From<usize> for f32
fn cast(src: usize) -> f32
impl From<usize> for f64
fn cast(src: usize) -> f64
impl From<usize> for i64
fn cast(src: usize) -> i64
impl From<usize> for u32
fn cast(src: usize) -> u32
impl From<usize> for usize
fn cast(src: usize) -> usize
impl From<usize> for u64
fn cast(src: usize) -> u64
impl From<u64> for f32
fn cast(src: u64) -> f32
impl From<u64> for f64
fn cast(src: u64) -> f64
impl From<u64> for u64
fn cast(src: u64) -> u64
impl From<u8> for i8
fn cast(src: u8) -> Self::Output
impl From<u16> for i8
fn cast(src: u16) -> Self::Output
impl From<u16> for i16
impl From<u16> for u8
impl From<u32> for i8
fn cast(src: u32) -> Self::Output
impl From<u32> for i16
impl From<u32> for i32
impl From<u32> for isize
impl From<u32> for u8
impl From<u32> for u16
impl From<usize> for i8
fn cast(src: usize) -> Self::Output
impl From<usize> for i16
impl From<usize> for i32
impl From<usize> for isize
impl From<usize> for u8
impl From<usize> for u16
impl From<u64> for i8
fn cast(src: u64) -> Self::Output
impl From<u64> for i16
impl From<u64> for i32
impl From<u64> for isize
impl From<u64> for i64
type Output = Result<i64, Error>
impl From<u64> for u8
impl From<u64> for u16
impl From<u64> for u32
impl From<u64> for usize
impl From<f32> for f32
fn cast(src: f32) -> f32
impl From<f32> for f64
fn cast(src: f32) -> f64
impl From<f64> for f64
fn cast(src: f64) -> f64
impl From<f32> for i8
fn cast(src: f32) -> Self::Output
impl From<f32> for i16
impl From<f32> for i32
impl From<f32> for isize
impl From<f32> for i64
impl From<f32> for u8
impl From<f32> for u16
impl From<f32> for u32
impl From<f32> for usize
impl From<f32> for u64
impl From<f64> for i8
fn cast(src: f64) -> Self::Output
impl From<f64> for i16
impl From<f64> for i32
impl From<f64> for isize
impl From<f64> for i64
impl From<f64> for u8
impl From<f64> for u16
impl From<f64> for u32
impl From<f64> for usize
impl From<f64> for u64
impl From<f64> for f32
type Output = Result<f32, Error>