pub struct Status { /* private fields */ }
Expand description
Represents exceptional conditions resulting from operations on decimal numbers.
For details about the various exceptional conditions, consult the Exceptional Conditions chapter of the General Decimal Arithmetic specification.
Implementations§
source§impl Status
impl Status
sourcepub fn conversion_syntax(&self) -> bool
pub fn conversion_syntax(&self) -> bool
Reports whether the conversion syntax flag is set.
Operations set this flag when an invalid string is converted to a decimal.
sourcepub fn set_conversion_syntax(&mut self)
pub fn set_conversion_syntax(&mut self)
Sets self
’s conversion syntax flag.
sourcepub fn division_by_zero(&self) -> bool
pub fn division_by_zero(&self) -> bool
Reports whether the division by zero flag is set.
Operations set this flag when a nonzero dividend is divided by zero.
sourcepub fn set_division_by_zero(&mut self)
pub fn set_division_by_zero(&mut self)
Sets self
’s division by zero flag.
sourcepub fn division_impossible(&self) -> bool
pub fn division_impossible(&self) -> bool
Reports whether the division impossible flag is set.
Operations set this flag if the integer result of a division had too many digits.
sourcepub fn set_division_impossible(&mut self)
pub fn set_division_impossible(&mut self)
Sets self
’s division impossible flag.
sourcepub fn division_undefined(&self) -> bool
pub fn division_undefined(&self) -> bool
Reports whether the division undefined flag is set.
Operations set this flag when a zero dividend is divided by zero.
sourcepub fn set_division_undefined(&mut self)
pub fn set_division_undefined(&mut self)
Sets self
’s division undefined flag.
sourcepub fn insufficient_storage(&self) -> bool
pub fn insufficient_storage(&self) -> bool
Reports whether the insufficient storage flag is set.
Operations set this flag if memory allocation fails.
sourcepub fn set_insufficient_storage(&mut self)
pub fn set_insufficient_storage(&mut self)
Sets self
’s insufficient storage flag.
sourcepub fn inexact(&self) -> bool
pub fn inexact(&self) -> bool
Reports whether the inexact flag is set.
Operations set this flag when one or more nonzero coefficient digits were discarded during rounding from a result.
sourcepub fn set_inexact(&mut self)
pub fn set_inexact(&mut self)
Sets self
’s inexact flag.
sourcepub fn invalid_context(&self) -> bool
pub fn invalid_context(&self) -> bool
Reports whether the invalid context flag is set.
Operations set this flag if they detect an invalid context.
It should not be possible to pass an invalid context to an operation using this crate, but this method is nonetheless provided for completeness.
sourcepub fn set_invalid_context(&mut self)
pub fn set_invalid_context(&mut self)
Sets self
’s invalid context flag.
sourcepub fn invalid_operation(&self) -> bool
pub fn invalid_operation(&self) -> bool
Reports whether the invalid operation flag is set.
Various operations set this flag in response to invalid arguments.
sourcepub fn set_invalid_operation(&mut self)
pub fn set_invalid_operation(&mut self)
Sets self
’s invalid operation flag.
sourcepub fn overflow(&self) -> bool
pub fn overflow(&self) -> bool
Reports whether the overflow flag is set.
Operations set this flag when the exponent of a result is too large to be represented.
sourcepub fn set_overflow(&mut self)
pub fn set_overflow(&mut self)
Sets self
’s overflow flag.
sourcepub fn clamped(&self) -> bool
pub fn clamped(&self) -> bool
Reports whether the clamped flag is set.
Operations set this flag when the exponent of a result has been altered or constrained in order to fit the constraints of a specific concrete representation.
sourcepub fn set_clamped(&mut self)
pub fn set_clamped(&mut self)
Sets self
’s clamped flag.
sourcepub fn rounded(&self) -> bool
pub fn rounded(&self) -> bool
Reports whether the rounded flag is set.
Operations set this flag when one or more zero or nonzero coefficient digits were discarded from a result.
sourcepub fn set_rounded(&mut self)
pub fn set_rounded(&mut self)
Sets self
’s rounded flag.
sourcepub fn subnormal(&self) -> bool
pub fn subnormal(&self) -> bool
Reports whether the subnormal flag is set.
Operations set this flag when a result’s adjusted exponent is less than Emin before any rounding.
sourcepub fn set_subnormal(&mut self)
pub fn set_subnormal(&mut self)
Sets self
’s subnormal flag.
sourcepub fn underflow(&self) -> bool
pub fn underflow(&self) -> bool
Reports whether the underflow flag is set.
Operations set this flag when a result is both subnormal and inexact.
sourcepub fn set_underflow(&mut self)
pub fn set_underflow(&mut self)
Sets self
’s underflow flag.
Trait Implementations§
source§impl BitAndAssign for Status
impl BitAndAssign for Status
source§fn bitand_assign(&mut self, rhs: Status)
fn bitand_assign(&mut self, rhs: Status)
&=
operation. Read moresource§impl BitOrAssign for Status
impl BitOrAssign for Status
source§fn bitor_assign(&mut self, rhs: Status)
fn bitor_assign(&mut self, rhs: Status)
|=
operation. Read moreimpl Copy for Status
impl Eq for Status
impl StructuralPartialEq for Status
Auto Trait Implementations§
impl Freeze for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnwindSafe for Status
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)