Skip to main content

DecimalTypeUpcast

Trait DecimalTypeUpcast 

Source
pub trait DecimalTypeUpcast {
    type Input<T: NativeDecimalType>;

    // Required methods
    fn from_i8(input: Self::Input<i8>) -> Self;
    fn from_i16(input: Self::Input<i16>) -> Self;
    fn from_i32(input: Self::Input<i32>) -> Self;
    fn from_i64(input: Self::Input<i64>) -> Self;
    fn from_i128(input: Self::Input<i128>) -> Self;
    fn from_i256(input: Self::Input<i256>) -> Self;
}
Expand description

Trait for upcasting native integer types to decimal values.

Required Associated Types§

Source

type Input<T: NativeDecimalType>

The input type for upcasting.

Required Methods§

Source

fn from_i8(input: Self::Input<i8>) -> Self

Upcast from i8.

Source

fn from_i16(input: Self::Input<i16>) -> Self

Upcast from i16.

Source

fn from_i32(input: Self::Input<i32>) -> Self

Upcast from i32.

Source

fn from_i64(input: Self::Input<i64>) -> Self

Upcast from i64.

Source

fn from_i128(input: Self::Input<i128>) -> Self

Upcast from i128.

Source

fn from_i256(input: Self::Input<i256>) -> Self

Upcast from i256.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§