struct RoundingModeGuard {
previous_mode: Option<RoundingMode>,
}Expand description
RAII guard for temporarily setting rounding mode Automatically restores the previous rounding mode when dropped
Fields§
§previous_mode: Option<RoundingMode>Implementations§
Source§impl RoundingModeGuard
impl RoundingModeGuard
Sourcefn new(mode: NumberRoundingMode) -> Self
fn new(mode: NumberRoundingMode) -> Self
Set a new rounding mode and return a guard that will restore the previous mode
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RoundingModeGuard
impl RefUnwindSafe for RoundingModeGuard
impl Send for RoundingModeGuard
impl Sync for RoundingModeGuard
impl Unpin for RoundingModeGuard
impl UnwindSafe for RoundingModeGuard
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
Mutably borrows from an owned value. Read more