Trait monetary::Exchange

source ·
pub trait Exchange<A, B> {
    // Required methods
    fn mul_floor(&self, rate: &Rate<B, A>) -> AmountU128<B>;
    fn mul_ceil(&self, rate: &Rate<B, A>) -> AmountU128<B>;
    fn div_floor(&self, rate: &Rate<A, B>) -> AmountU128<B>;
    fn div_ceil(&self, rate: &Rate<A, B>) -> AmountU128<B>;
}

Required Methods§

source

fn mul_floor(&self, rate: &Rate<B, A>) -> AmountU128<B>

source

fn mul_ceil(&self, rate: &Rate<B, A>) -> AmountU128<B>

source

fn div_floor(&self, rate: &Rate<A, B>) -> AmountU128<B>

source

fn div_ceil(&self, rate: &Rate<A, B>) -> AmountU128<B>

Implementors§

source§

impl<A, B> Exchange<A, B> for AmountU128<A>