RoundInto

Trait RoundInto 

Source
pub trait RoundInto<T>
where Self: Sized, T: Sized,
{ // Required method fn round_into(self) -> T; }
Expand description

Types providing methods to round their values to fit a given type T.

Required Methods§

Source

fn round_into(self) -> T

Return a new T instance with a value equivalent to self rounded to a number of fractional digits implied by T.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<const P: u8> RoundInto<i128> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

impl<const P: u8, const Q: u8> RoundInto<Decimal<Q>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,