Trait UnitaryFloatOps

pub trait UnitaryFloatOps: Sized {
    // Required methods
    fn mul_f64(&self, rhs: f64) -> Result<Self, GeneralError>;
    fn div_f64(&self, rhs: f64) -> Result<Self, GeneralError>;
}
Expand description

Allows type to be multiplied and divided by a float in range [0.0, 1.0].

Required Methods§

fn mul_f64(&self, rhs: f64) -> Result<Self, GeneralError>

Multiply with float in the interval [0.0, 1.0]

fn div_f64(&self, rhs: f64) -> Result<Self, GeneralError>

Divide by float in the interval (0.0, 1.0]

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§

§

impl UnitaryFloatOps for U256

§

fn mul_f64(&self, rhs: f64) -> Result<U256, GeneralError>

§

fn div_f64(&self, rhs: f64) -> Result<U256, GeneralError>

Implementors§

§

impl<C> UnitaryFloatOps for Balance<C>
where C: Currency,