pub enum Rounding {
HalfUp,
HalfEven,
Truncate,
Up,
}Expand description
Como arredondar ao cortar casas.
Variants§
HalfUp
Metade para longe do zero: 2,345 → 2,35. O padrão.
HalfEven
Metade para o par, o “bancário”: 2,345 → 2,34 e 2,355 → 2,36.
Truncate
Corta as casas: 2,349 → 2,34 (o Trunc).
Up
Para longe do zero sempre que sobra algo: 2,341 → 2,35.
Implementations§
Trait Implementations§
impl Copy for Rounding
impl Eq for Rounding
Source§impl PropEnum for Rounding
impl PropEnum for Rounding
impl StructuralPartialEq for Rounding
Auto Trait Implementations§
impl Forget for Rounding
impl Freeze for Rounding
impl Move for Rounding
impl RefUnwindSafe for Rounding
impl Send for Rounding
impl Sync for Rounding
impl Unpin for Rounding
impl UnsafeUnpin for Rounding
impl UnwindSafe for Rounding
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.