Enum leptos_use::RoundingMode
source · pub enum RoundingMode {
Ceil,
Floor,
Expand,
Trunc,
HalfCeil,
HalfFloor,
HalfExpand,
HalfTrunc,
HalfEven,
}
Variants§
Ceil
round toward +∞. Positive values round up. Negative values round “more positive”.
Floor
round toward -∞. Positive values round down. Negative values round “more negative”.
Expand
round away from 0. The magnitude of the value is always increased by rounding. Positive values round up. Negative values round “more negative”.
Trunc
round toward 0. This magnitude of the value is always reduced by rounding. Positive values round down. Negative values round “less negative”.
HalfCeil
ties toward +∞. Values above the half-increment round like Ceil
(towards +∞), and below like Floor
(towards -∞). On the half-increment, values round like Ceil
.
HalfFloor
ties toward -∞. Values above the half-increment round like Ceil
(towards +∞), and below like Floor
(towards -∞). On the half-increment, values round like Floor
.
HalfExpand
ties away from 0. Values above the half-increment round like Expand
(away from zero), and below like Trunc
(towards 0). On the half-increment, values round like Expand
.
HalfTrunc
ties toward 0. Values above the half-increment round like Expand
(away from zero), and below like Trunc
(towards 0). On the half-increment, values round like Trunc
.
HalfEven
ties towards the nearest even integer. Values above the half-increment round like Expand
(away from zero), and below like Trunc
(towards 0). On the half-increment values round towards the nearest even digit.
Trait Implementations§
source§impl Clone for RoundingMode
impl Clone for RoundingMode
source§fn clone(&self) -> RoundingMode
fn clone(&self) -> RoundingMode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RoundingMode
impl Debug for RoundingMode
source§impl Default for RoundingMode
impl Default for RoundingMode
source§fn default() -> RoundingMode
fn default() -> RoundingMode
source§impl Display for RoundingMode
impl Display for RoundingMode
source§impl From<RoundingMode> for JsValue
impl From<RoundingMode> for JsValue
source§fn from(value: RoundingMode) -> Self
fn from(value: RoundingMode) -> Self
source§impl Hash for RoundingMode
impl Hash for RoundingMode
source§impl PartialEq for RoundingMode
impl PartialEq for RoundingMode
impl Copy for RoundingMode
impl Eq for RoundingMode
impl StructuralPartialEq for RoundingMode
Auto Trait Implementations§
impl Freeze for RoundingMode
impl RefUnwindSafe for RoundingMode
impl Send for RoundingMode
impl Sync for RoundingMode
impl Unpin for RoundingMode
impl UnwindSafe for RoundingMode
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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>
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>
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