Enum sp_arithmetic::per_things::Rounding
source · pub enum Rounding {
Up,
Down,
NearestPrefUp,
NearestPrefDown,
}
Expand description
The rounding method to use for unsigned quantities.
Variants§
Implementations§
source§impl Rounding
impl Rounding
sourcepub const fn from_signed(rounding: SignedRounding, negative: bool) -> Self
pub const fn from_signed(rounding: SignedRounding, negative: bool) -> Self
Returns the value for Rounding
which would give the same result ignorant of the sign.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Rounding
impl Send for Rounding
impl Sync for Rounding
impl Unpin for Rounding
impl UnwindSafe for Rounding
Blanket Implementations§
source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T
. Read moresource§impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.