Enum RoundingStep
#[non_exhaustive]pub enum RoundingStep {
TruncThenRound {
trunc: i32,
round: i32,
},
Round(i32),
}Expand description
One rounding step in a market’s published chain.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
TruncThenRound
Truncate to trunc places, then round to round — the TIPS order,
which is not the same as rounding once and matters in the fifth
decimal.
Round(i32)
Round to 0 places-argument decimal places.
Implementations§
§impl RoundingStep
impl RoundingStep
Trait Implementations§
§impl Clone for RoundingStep
impl Clone for RoundingStep
§fn clone(&self) -> RoundingStep
fn clone(&self) -> RoundingStep
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RoundingStep
§impl Debug for RoundingStep
impl Debug for RoundingStep
impl Eq for RoundingStep
§impl PartialEq for RoundingStep
impl PartialEq for RoundingStep
impl StructuralPartialEq for RoundingStep
Auto Trait Implementations§
impl Freeze for RoundingStep
impl RefUnwindSafe for RoundingStep
impl Send for RoundingStep
impl Sync for RoundingStep
impl Unpin for RoundingStep
impl UnsafeUnpin for RoundingStep
impl UnwindSafe for RoundingStep
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