NativeDecimalType

Trait NativeDecimalType 

Source
pub trait NativeDecimalType:
    Copy
    + Eq
    + Ord
    + Default
    + Send
    + Sync
    + BigCast
    + Debug
    + Display
    + 'static {
    const VALUES_TYPE: DecimalValueType;

    // Required method
    fn maybe_from(decimal_type: DecimalValue) -> Option<Self>;
}
Expand description

Type of decimal scalar values.

This trait is implemented by native integer types that can be used to store decimal values.

Required Associated Constants§

Source

const VALUES_TYPE: DecimalValueType

The decimal value type corresponding to this native type.

Required Methods§

Source

fn maybe_from(decimal_type: DecimalValue) -> Option<Self>

Attempts to convert a decimal value to this native type.

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 NativeDecimalType for i8

Source§

const VALUES_TYPE: DecimalValueType = DecimalValueType::I8

Source§

fn maybe_from(decimal_type: DecimalValue) -> Option<Self>

Source§

impl NativeDecimalType for i16

Source§

const VALUES_TYPE: DecimalValueType = DecimalValueType::I16

Source§

fn maybe_from(decimal_type: DecimalValue) -> Option<Self>

Source§

impl NativeDecimalType for i32

Source§

const VALUES_TYPE: DecimalValueType = DecimalValueType::I32

Source§

fn maybe_from(decimal_type: DecimalValue) -> Option<Self>

Source§

impl NativeDecimalType for i64

Source§

const VALUES_TYPE: DecimalValueType = DecimalValueType::I64

Source§

fn maybe_from(decimal_type: DecimalValue) -> Option<Self>

Source§

impl NativeDecimalType for i128

Source§

const VALUES_TYPE: DecimalValueType = DecimalValueType::I128

Source§

fn maybe_from(decimal_type: DecimalValue) -> Option<Self>

Implementors§

Source§

impl NativeDecimalType for i256

Source§

const VALUES_TYPE: DecimalValueType = DecimalValueType::I256