pub struct ConversionSide {
pub split_id: Uuid,
pub commodity: Uuid,
pub num: i64,
pub denom: i64,
}Expand description
Build a Price for a multi-currency split from rational components.
from is the spent amount (will be negated in the split),
to is the received amount in a different commodity.
Returns a Price whose rate converts to back to from units.
One side of a multi-currency conversion: which split, in which commodity,
for how much. The two sides are symmetric, which is why they share a type.
Fields§
§split_id: Uuid§commodity: Uuid§num: i64§denom: i64Auto Trait Implementations§
impl Freeze for ConversionSide
impl RefUnwindSafe for ConversionSide
impl Send for ConversionSide
impl Sync for ConversionSide
impl Unpin for ConversionSide
impl UnsafeUnpin for ConversionSide
impl UnwindSafe for ConversionSide
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more