Trait mz_repr::adt::numeric::DecimalLike

source ·
pub trait DecimalLike: From<u8> + From<u16> + From<u32> + From<i8> + From<i16> + From<i32> + From<f32> + From<f64> + Add<Output = Self> + Sub<Output = Self> + Mul<Output = Self> + Div<Output = Self> {
    // Required method
    fn lossy_from(i: i64) -> Self;
}
Expand description

A type that can represent Real Numbers. Useful for interoperability between Numeric and floating point.

Required Methods§

source

fn lossy_from(i: i64) -> Self

Used to do value-to-value conversions while consuming the input value. Depending on the implementation it may be potentially lossy.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl DecimalLike for f64

source§

fn lossy_from(i: i64) -> Self

Implementors§