Trait UpcastFrom

Source
pub trait UpcastFrom<T> {
    // Required method
    fn upcast_from(value: T) -> Self;
}
Expand description

Losslessly upcasts from one type to another

Required Methods§

Source

fn upcast_from(value: T) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl UpcastFrom<&i8> for i8

Source§

fn upcast_from(value: &Self) -> Self

Source§

impl UpcastFrom<&i8> for i16

Source§

fn upcast_from(value: &i8) -> Self

Source§

impl UpcastFrom<&i8> for i32

Source§

fn upcast_from(value: &i8) -> Self

Source§

impl UpcastFrom<&i8> for i64

Source§

fn upcast_from(value: &i8) -> Self

Source§

impl UpcastFrom<&i8> for i128

Source§

fn upcast_from(value: &i8) -> Self

Source§

impl UpcastFrom<&i16> for i16

Source§

fn upcast_from(value: &Self) -> Self

Source§

impl UpcastFrom<&i16> for i32

Source§

fn upcast_from(value: &i16) -> Self

Source§

impl UpcastFrom<&i16> for i64

Source§

fn upcast_from(value: &i16) -> Self

Source§

impl UpcastFrom<&i16> for i128

Source§

fn upcast_from(value: &i16) -> Self

Source§

impl UpcastFrom<&i32> for i32

Source§

fn upcast_from(value: &Self) -> Self

Source§

impl UpcastFrom<&i32> for i64

Source§

fn upcast_from(value: &i32) -> Self

Source§

impl UpcastFrom<&i32> for i128

Source§

fn upcast_from(value: &i32) -> Self

Source§

impl UpcastFrom<&i64> for i64

Source§

fn upcast_from(value: &Self) -> Self

Source§

impl UpcastFrom<&i64> for i128

Source§

fn upcast_from(value: &i64) -> Self

Source§

impl UpcastFrom<&i128> for i128

Source§

fn upcast_from(value: &Self) -> Self

Source§

impl UpcastFrom<&u8> for u8

Source§

fn upcast_from(value: &Self) -> Self

Source§

impl UpcastFrom<&u8> for u16

Source§

fn upcast_from(value: &u8) -> Self

Source§

impl UpcastFrom<&u8> for u32

Source§

fn upcast_from(value: &u8) -> Self

Source§

impl UpcastFrom<&u8> for u64

Source§

fn upcast_from(value: &u8) -> Self

Source§

impl UpcastFrom<&u8> for u128

Source§

fn upcast_from(value: &u8) -> Self

Source§

impl UpcastFrom<&u16> for u16

Source§

fn upcast_from(value: &Self) -> Self

Source§

impl UpcastFrom<&u16> for u32

Source§

fn upcast_from(value: &u16) -> Self

Source§

impl UpcastFrom<&u16> for u64

Source§

fn upcast_from(value: &u16) -> Self

Source§

impl UpcastFrom<&u16> for u128

Source§

fn upcast_from(value: &u16) -> Self

Source§

impl UpcastFrom<&u32> for u32

Source§

fn upcast_from(value: &Self) -> Self

Source§

impl UpcastFrom<&u32> for u64

Source§

fn upcast_from(value: &u32) -> Self

Source§

impl UpcastFrom<&u32> for u128

Source§

fn upcast_from(value: &u32) -> Self

Source§

impl UpcastFrom<&u64> for u64

Source§

fn upcast_from(value: &Self) -> Self

Source§

impl UpcastFrom<&u64> for u128

Source§

fn upcast_from(value: &u64) -> Self

Source§

impl UpcastFrom<&u128> for u128

Source§

fn upcast_from(value: &Self) -> Self

Source§

impl UpcastFrom<i8> for i8

Source§

fn upcast_from(value: Self) -> Self

Source§

impl UpcastFrom<i8> for i16

Source§

fn upcast_from(value: i8) -> Self

Source§

impl UpcastFrom<i8> for i32

Source§

fn upcast_from(value: i8) -> Self

Source§

impl UpcastFrom<i8> for i64

Source§

fn upcast_from(value: i8) -> Self

Source§

impl UpcastFrom<i8> for i128

Source§

fn upcast_from(value: i8) -> Self

Source§

impl UpcastFrom<i16> for i16

Source§

fn upcast_from(value: Self) -> Self

Source§

impl UpcastFrom<i16> for i32

Source§

fn upcast_from(value: i16) -> Self

Source§

impl UpcastFrom<i16> for i64

Source§

fn upcast_from(value: i16) -> Self

Source§

impl UpcastFrom<i16> for i128

Source§

fn upcast_from(value: i16) -> Self

Source§

impl UpcastFrom<i32> for i32

Source§

fn upcast_from(value: Self) -> Self

Source§

impl UpcastFrom<i32> for i64

Source§

fn upcast_from(value: i32) -> Self

Source§

impl UpcastFrom<i32> for i128

Source§

fn upcast_from(value: i32) -> Self

Source§

impl UpcastFrom<i64> for i64

Source§

fn upcast_from(value: Self) -> Self

Source§

impl UpcastFrom<i64> for i128

Source§

fn upcast_from(value: i64) -> Self

Source§

impl UpcastFrom<i128> for i128

Source§

fn upcast_from(value: Self) -> Self

Source§

impl UpcastFrom<u8> for u8

Source§

fn upcast_from(value: Self) -> Self

Source§

impl UpcastFrom<u8> for u16

Source§

fn upcast_from(value: u8) -> Self

Source§

impl UpcastFrom<u8> for u32

Source§

fn upcast_from(value: u8) -> Self

Source§

impl UpcastFrom<u8> for u64

Source§

fn upcast_from(value: u8) -> Self

Source§

impl UpcastFrom<u8> for u128

Source§

fn upcast_from(value: u8) -> Self

Source§

impl UpcastFrom<u16> for u16

Source§

fn upcast_from(value: Self) -> Self

Source§

impl UpcastFrom<u16> for u32

Source§

fn upcast_from(value: u16) -> Self

Source§

impl UpcastFrom<u16> for u64

Source§

fn upcast_from(value: u16) -> Self

Source§

impl UpcastFrom<u16> for u128

Source§

fn upcast_from(value: u16) -> Self

Source§

impl UpcastFrom<u32> for u32

Source§

fn upcast_from(value: Self) -> Self

Source§

impl UpcastFrom<u32> for u64

Source§

fn upcast_from(value: u32) -> Self

Source§

impl UpcastFrom<u32> for u128

Source§

fn upcast_from(value: u32) -> Self

Source§

impl UpcastFrom<u64> for u64

Source§

fn upcast_from(value: Self) -> Self

Source§

impl UpcastFrom<u64> for u128

Source§

fn upcast_from(value: u64) -> Self

Source§

impl UpcastFrom<u128> for u128

Source§

fn upcast_from(value: Self) -> Self

Source§

impl<Rhs> UpcastFrom<Rhs> for isize
where i64: UpcastFrom<Rhs>,

Source§

fn upcast_from(value: Rhs) -> Self

Source§

impl<Rhs> UpcastFrom<Rhs> for usize
where u64: UpcastFrom<Rhs>,

Source§

fn upcast_from(value: Rhs) -> Self

Implementors§

Source§

impl<T, B> UpcastFrom<&Counter<T, B>> for T
where T: for<'a> UpcastFrom<&'a T>,

Source§

impl<T, B> UpcastFrom<Counter<T, B>> for T