pub struct FExcept(/* private fields */);
Expand description
A wrapper over floating point exception flags.
This type encapsulate the behaviour of manipulating the configuration of floating point exceptions without needing to deal with the raw API.
Implementations§
source§impl FExcept
impl FExcept
pub const INVALID: Self = _
pub const DENORM: Self = _
pub const DIV_BY_ZERO: Self = _
pub const OVERFLOW: Self = _
pub const UNDERFLOW: Self = _
pub const INEXACT: Self = _
pub const FE_ALL: Self = _
pub fn none() -> Self
sourcepub fn or(self, other: Self) -> Self
pub fn or(self, other: Self) -> Self
Return a new set of flags which enbable all mutual flags between self
and other
.
source§impl FExcept
impl FExcept
sourcepub fn clear(self) -> Result<(), NonZeroI32>
pub fn clear(self) -> Result<(), NonZeroI32>
visit: https://en.cppreference.com/w/cpp/numeric/fenv/feclearexcept
sourcepub fn getflag(self) -> Result<Self, NonZeroI32>
pub fn getflag(self) -> Result<Self, NonZeroI32>
visit: https://en.cppreference.com/w/c/numeric/fenv/feexceptflag
sourcepub fn setflag(self) -> Result<(), NonZeroI32>
pub fn setflag(self) -> Result<(), NonZeroI32>
visit: https://en.cppreference.com/w/c/numeric/fenv/feexceptflag
sourcepub fn raise(self) -> Result<(), NonZeroI32>
pub fn raise(self) -> Result<(), NonZeroI32>
visit: https://en.cppreference.com/w/c/numeric/fenv/feraiseexcept
Trait Implementations§
source§impl BitOrAssign for FExcept
impl BitOrAssign for FExcept
source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|=
operation. Read moresource§impl PartialEq for FExcept
impl PartialEq for FExcept
impl Copy for FExcept
impl Eq for FExcept
impl StructuralPartialEq for FExcept
Auto Trait Implementations§
impl Freeze for FExcept
impl RefUnwindSafe for FExcept
impl Send for FExcept
impl Sync for FExcept
impl Unpin for FExcept
impl UnwindSafe for FExcept
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