[][src]Trait better_as::number::CheckedCast

pub trait CheckedCast<T> {
    type Error;
    pub fn checked_cast(self) -> Result<T, Self::Error>;
}

Associated Types

Loading content...

Required methods

pub fn checked_cast(self) -> Result<T, Self::Error>[src]

Loading content...

Implementations on Foreign Types

impl CheckedCast<u8> for u8[src]

type Error = Infallible

impl CheckedCast<u16> for u8[src]

type Error = Infallible

impl CheckedCast<u32> for u8[src]

type Error = Infallible

impl CheckedCast<u64> for u8[src]

type Error = Infallible

impl CheckedCast<u128> for u8[src]

type Error = Infallible

impl CheckedCast<i8> for u8[src]

type Error = NumCastError

impl CheckedCast<i16> for u8[src]

type Error = Infallible

impl CheckedCast<i32> for u8[src]

type Error = Infallible

impl CheckedCast<i64> for u8[src]

type Error = Infallible

impl CheckedCast<i128> for u8[src]

type Error = Infallible

impl CheckedCast<usize> for u8[src]

type Error = Infallible

impl CheckedCast<isize> for u8[src]

type Error = Infallible

impl CheckedCast<f32> for u8[src]

type Error = Infallible

impl CheckedCast<f64> for u8[src]

type Error = Infallible

impl CheckedCast<u8> for u16[src]

type Error = NumCastError

impl CheckedCast<u16> for u16[src]

type Error = Infallible

impl CheckedCast<u32> for u16[src]

type Error = Infallible

impl CheckedCast<u64> for u16[src]

type Error = Infallible

impl CheckedCast<u128> for u16[src]

type Error = Infallible

impl CheckedCast<i8> for u16[src]

type Error = NumCastError

impl CheckedCast<i16> for u16[src]

type Error = NumCastError

impl CheckedCast<i32> for u16[src]

type Error = Infallible

impl CheckedCast<i64> for u16[src]

type Error = Infallible

impl CheckedCast<i128> for u16[src]

type Error = Infallible

impl CheckedCast<usize> for u16[src]

type Error = Infallible

impl CheckedCast<isize> for u16[src]

type Error = NumCastError

impl CheckedCast<f32> for u16[src]

type Error = Infallible

impl CheckedCast<f64> for u16[src]

type Error = Infallible

impl CheckedCast<u8> for u32[src]

type Error = NumCastError

impl CheckedCast<u16> for u32[src]

type Error = NumCastError

impl CheckedCast<u32> for u32[src]

type Error = Infallible

impl CheckedCast<u64> for u32[src]

type Error = Infallible

impl CheckedCast<u128> for u32[src]

type Error = Infallible

impl CheckedCast<i8> for u32[src]

type Error = NumCastError

impl CheckedCast<i16> for u32[src]

type Error = NumCastError

impl CheckedCast<i32> for u32[src]

type Error = NumCastError

impl CheckedCast<i64> for u32[src]

type Error = Infallible

impl CheckedCast<i128> for u32[src]

type Error = Infallible

impl CheckedCast<usize> for u32[src]

type Error = NumCastError

impl CheckedCast<isize> for u32[src]

type Error = NumCastError

impl CheckedCast<u8> for u64[src]

type Error = NumCastError

impl CheckedCast<u16> for u64[src]

type Error = NumCastError

impl CheckedCast<u32> for u64[src]

type Error = NumCastError

impl CheckedCast<u64> for u64[src]

type Error = Infallible

impl CheckedCast<u128> for u64[src]

type Error = Infallible

impl CheckedCast<i8> for u64[src]

type Error = NumCastError

impl CheckedCast<i16> for u64[src]

type Error = NumCastError

impl CheckedCast<i32> for u64[src]

type Error = NumCastError

impl CheckedCast<i64> for u64[src]

type Error = NumCastError

impl CheckedCast<i128> for u64[src]

type Error = Infallible

impl CheckedCast<usize> for u64[src]

type Error = NumCastError

impl CheckedCast<isize> for u64[src]

type Error = NumCastError

impl CheckedCast<u8> for u128[src]

type Error = NumCastError

impl CheckedCast<u16> for u128[src]

type Error = NumCastError

impl CheckedCast<u32> for u128[src]

type Error = NumCastError

impl CheckedCast<u64> for u128[src]

type Error = NumCastError

impl CheckedCast<u128> for u128[src]

type Error = Infallible

impl CheckedCast<i8> for u128[src]

type Error = NumCastError

impl CheckedCast<i16> for u128[src]

type Error = NumCastError

impl CheckedCast<i32> for u128[src]

type Error = NumCastError

impl CheckedCast<i64> for u128[src]

type Error = NumCastError

impl CheckedCast<i128> for u128[src]

type Error = NumCastError

impl CheckedCast<usize> for u128[src]

type Error = NumCastError

impl CheckedCast<isize> for u128[src]

type Error = NumCastError

impl CheckedCast<u8> for i8[src]

type Error = NumCastError

impl CheckedCast<u16> for i8[src]

type Error = NumCastError

impl CheckedCast<u32> for i8[src]

type Error = NumCastError

impl CheckedCast<u64> for i8[src]

type Error = NumCastError

impl CheckedCast<u128> for i8[src]

type Error = NumCastError

impl CheckedCast<i8> for i8[src]

type Error = Infallible

impl CheckedCast<i16> for i8[src]

type Error = Infallible

impl CheckedCast<i32> for i8[src]

type Error = Infallible

impl CheckedCast<i64> for i8[src]

type Error = Infallible

impl CheckedCast<i128> for i8[src]

type Error = Infallible

impl CheckedCast<usize> for i8[src]

type Error = NumCastError

impl CheckedCast<isize> for i8[src]

type Error = Infallible

impl CheckedCast<f32> for i8[src]

type Error = Infallible

impl CheckedCast<f64> for i8[src]

type Error = Infallible

impl CheckedCast<u8> for i16[src]

type Error = NumCastError

impl CheckedCast<u16> for i16[src]

type Error = NumCastError

impl CheckedCast<u32> for i16[src]

type Error = NumCastError

impl CheckedCast<u64> for i16[src]

type Error = NumCastError

impl CheckedCast<u128> for i16[src]

type Error = NumCastError

impl CheckedCast<i8> for i16[src]

type Error = NumCastError

impl CheckedCast<i16> for i16[src]

type Error = Infallible

impl CheckedCast<i32> for i16[src]

type Error = Infallible

impl CheckedCast<i64> for i16[src]

type Error = Infallible

impl CheckedCast<i128> for i16[src]

type Error = Infallible

impl CheckedCast<usize> for i16[src]

type Error = NumCastError

impl CheckedCast<isize> for i16[src]

type Error = Infallible

impl CheckedCast<f32> for i16[src]

type Error = Infallible

impl CheckedCast<f64> for i16[src]

type Error = Infallible

impl CheckedCast<u8> for i32[src]

type Error = NumCastError

impl CheckedCast<u16> for i32[src]

type Error = NumCastError

impl CheckedCast<u32> for i32[src]

type Error = NumCastError

impl CheckedCast<u64> for i32[src]

type Error = NumCastError

impl CheckedCast<u128> for i32[src]

type Error = NumCastError

impl CheckedCast<i8> for i32[src]

type Error = NumCastError

impl CheckedCast<i16> for i32[src]

type Error = NumCastError

impl CheckedCast<i32> for i32[src]

type Error = Infallible

impl CheckedCast<i64> for i32[src]

type Error = Infallible

impl CheckedCast<i128> for i32[src]

type Error = Infallible

impl CheckedCast<usize> for i32[src]

type Error = NumCastError

impl CheckedCast<isize> for i32[src]

type Error = NumCastError

impl CheckedCast<u8> for i64[src]

type Error = NumCastError

impl CheckedCast<u16> for i64[src]

type Error = NumCastError

impl CheckedCast<u32> for i64[src]

type Error = NumCastError

impl CheckedCast<u64> for i64[src]

type Error = NumCastError

impl CheckedCast<u128> for i64[src]

type Error = NumCastError

impl CheckedCast<i8> for i64[src]

type Error = NumCastError

impl CheckedCast<i16> for i64[src]

type Error = NumCastError

impl CheckedCast<i32> for i64[src]

type Error = NumCastError

impl CheckedCast<i64> for i64[src]

type Error = Infallible

impl CheckedCast<i128> for i64[src]

type Error = Infallible

impl CheckedCast<usize> for i64[src]

type Error = NumCastError

impl CheckedCast<isize> for i64[src]

type Error = NumCastError

impl CheckedCast<u8> for i128[src]

type Error = NumCastError

impl CheckedCast<u16> for i128[src]

type Error = NumCastError

impl CheckedCast<u32> for i128[src]

type Error = NumCastError

impl CheckedCast<u64> for i128[src]

type Error = NumCastError

impl CheckedCast<u128> for i128[src]

type Error = NumCastError

impl CheckedCast<i8> for i128[src]

type Error = NumCastError

impl CheckedCast<i16> for i128[src]

type Error = NumCastError

impl CheckedCast<i32> for i128[src]

type Error = NumCastError

impl CheckedCast<i64> for i128[src]

type Error = NumCastError

impl CheckedCast<i128> for i128[src]

type Error = Infallible

impl CheckedCast<usize> for i128[src]

type Error = NumCastError

impl CheckedCast<isize> for i128[src]

type Error = NumCastError

impl CheckedCast<u8> for usize[src]

type Error = NumCastError

impl CheckedCast<u16> for usize[src]

type Error = NumCastError

impl CheckedCast<u32> for usize[src]

type Error = NumCastError

impl CheckedCast<u64> for usize[src]

type Error = NumCastError

impl CheckedCast<u128> for usize[src]

type Error = NumCastError

impl CheckedCast<i8> for usize[src]

type Error = NumCastError

impl CheckedCast<i16> for usize[src]

type Error = NumCastError

impl CheckedCast<i32> for usize[src]

type Error = NumCastError

impl CheckedCast<i64> for usize[src]

type Error = NumCastError

impl CheckedCast<i128> for usize[src]

type Error = NumCastError

impl CheckedCast<usize> for usize[src]

type Error = Infallible

impl CheckedCast<isize> for usize[src]

type Error = NumCastError

impl CheckedCast<u8> for isize[src]

type Error = NumCastError

impl CheckedCast<u16> for isize[src]

type Error = NumCastError

impl CheckedCast<u32> for isize[src]

type Error = NumCastError

impl CheckedCast<u64> for isize[src]

type Error = NumCastError

impl CheckedCast<u128> for isize[src]

type Error = NumCastError

impl CheckedCast<i8> for isize[src]

type Error = NumCastError

impl CheckedCast<i16> for isize[src]

type Error = NumCastError

impl CheckedCast<i32> for isize[src]

type Error = NumCastError

impl CheckedCast<i64> for isize[src]

type Error = NumCastError

impl CheckedCast<i128> for isize[src]

type Error = NumCastError

impl CheckedCast<usize> for isize[src]

type Error = NumCastError

impl CheckedCast<isize> for isize[src]

type Error = Infallible

impl CheckedCast<u8> for f32[src]

type Error = NumCastError

impl CheckedCast<u16> for f32[src]

type Error = NumCastError

impl CheckedCast<i8> for f32[src]

type Error = NumCastError

impl CheckedCast<i16> for f32[src]

type Error = NumCastError

impl CheckedCast<f32> for f32[src]

type Error = Infallible

impl CheckedCast<f64> for f32[src]

type Error = Infallible

impl CheckedCast<u8> for f64[src]

type Error = NumCastError

impl CheckedCast<u16> for f64[src]

type Error = NumCastError

impl CheckedCast<i8> for f64[src]

type Error = NumCastError

impl CheckedCast<i16> for f64[src]

type Error = NumCastError

impl CheckedCast<f64> for f64[src]

type Error = Infallible

Loading content...

Implementors

Loading content...