[−][src]Enum lexical_core::RoundingKind
Rounding type for float-parsing.
Defines the IEEE754 rounding scheme to be used during float parsing.
In general, this should be set to NearestTieEven, the default
recommended rounding scheme by IEEE754 for binary and decimal
operations.
FFI
For interfacing with FFI-code, this may be approximated by:
const int32_t NEAREST_TIE_EVEN = 0;
const int32_t NEAREST_TIE_AWAY_ZERO = 1;
const int32_t TOWARD_POSITIVE_INFINITY = 2;
const int32_t TOWARD_NEGATIVE_INFINITY = 3;
const int32_t TOWARD_ZERO = 4;
Safety
Assigning any value outside the range [1-4] to value of type
RoundingKind may invoke undefined-behavior.
Variants
NearestTieEvenRound to the nearest, tie to even.
NearestTieAwayZeroRound to the nearest, tie away from zero.
TowardPositiveInfinityRound toward positive infinity.
TowardNegativeInfinityRound toward negative infinity.
TowardZeroRound toward zero.
Trait Implementations
impl Eq for RoundingKind[src]
impl PartialEq<RoundingKind> for RoundingKind[src]
fn eq(&self, other: &RoundingKind) -> bool[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
This method tests for !=.
impl Copy for RoundingKind[src]
impl Clone for RoundingKind[src]
fn clone(&self) -> RoundingKind[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Debug for RoundingKind[src]
Auto Trait Implementations
impl Send for RoundingKind
impl Sync for RoundingKind
Blanket Implementations
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,