pub(crate) enum ResolvedRoundingStrategy {
RoundUp,
RoundDown,
RoundToEven,
}
Expand description
The resolved rounding strategy internal to the round method
Variants§
Implementations§
source§impl ResolvedRoundingStrategy
impl ResolvedRoundingStrategy
pub fn from_mode( mode: RoundingMode, is_positive: bool, compare_to_midpoint: impl FnOnce() -> Ordering ) -> Self
fn from_midpoint_ordering(ordering: Ordering, equal_strategy: Self) -> Self
fn towards_zero(is_positive: bool) -> Self
fn away_from_zero(is_positive: bool) -> Self
Auto Trait Implementations§
impl RefUnwindSafe for ResolvedRoundingStrategy
impl Send for ResolvedRoundingStrategy
impl Sync for ResolvedRoundingStrategy
impl Unpin for ResolvedRoundingStrategy
impl UnwindSafe for ResolvedRoundingStrategy
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read moresource§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