[−]Struct simple_soft_float::StatusFlags
IEEE 754 status flags
Methods
impl StatusFlags
pub const INVALID_OPERATION: StatusFlags
Signaled if there is no usefully definable result.
pub const DIVISION_BY_ZERO: StatusFlags
Signaled when a exact infinite result is generated from an operation on finite operands.
pub const OVERFLOW: StatusFlags
Signaled when what would be the correctly rounded result were the exponent range unbounded is larger in magnitude than the largest finite representable number.
pub const UNDERFLOW: StatusFlags
Signaled when a tiny non-zero result is detected.
pub const INEXACT: StatusFlags
Signaled when the result of a floating-point operation is not exact.
pub const fn empty() -> StatusFlags
Returns an empty set of flags
pub const fn all() -> StatusFlags
Returns the set containing all flags.
pub const fn bits(&self) -> u32
Returns the raw value of the flags currently stored.
pub fn from_bits(bits: u32) -> Option<StatusFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub const fn from_bits_truncate(bits: u32) -> StatusFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub const unsafe fn from_bits_unchecked(bits: u32) -> StatusFlags
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
pub const fn is_empty(&self) -> bool
Returns true
if no flags are currently stored.
pub const fn is_all(&self) -> bool
Returns true
if all flags are currently set.
pub const fn intersects(&self, other: StatusFlags) -> bool
Returns true
if there are flags common to both self
and other
.
pub const fn contains(&self, other: StatusFlags) -> bool
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: StatusFlags)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: StatusFlags)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: StatusFlags)
Toggles the specified flags in-place.
pub fn set(&mut self, other: StatusFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Binary for StatusFlags
impl BitAnd<StatusFlags> for StatusFlags
type Output = StatusFlags
The resulting type after applying the &
operator.
fn bitand(self, other: StatusFlags) -> StatusFlags
Returns the intersection between the two sets of flags.
impl BitAndAssign<StatusFlags> for StatusFlags
fn bitand_assign(&mut self, other: StatusFlags)
Disables all flags disabled in the set.
impl BitOr<StatusFlags> for StatusFlags
type Output = StatusFlags
The resulting type after applying the |
operator.
fn bitor(self, other: StatusFlags) -> StatusFlags
Returns the union of the two sets of flags.
impl BitOrAssign<StatusFlags> for StatusFlags
fn bitor_assign(&mut self, other: StatusFlags)
Adds the set of flags.
impl BitXor<StatusFlags> for StatusFlags
type Output = StatusFlags
The resulting type after applying the ^
operator.
fn bitxor(self, other: StatusFlags) -> StatusFlags
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign<StatusFlags> for StatusFlags
fn bitxor_assign(&mut self, other: StatusFlags)
Toggles the set of flags.
impl Clone for StatusFlags
fn clone(&self) -> StatusFlags
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for StatusFlags
impl Debug for StatusFlags
impl Default for StatusFlags
[src]
impl Eq for StatusFlags
impl Extend<StatusFlags> for StatusFlags
fn extend<T: IntoIterator<Item = StatusFlags>>(&mut self, iterator: T)
impl FromIterator<StatusFlags> for StatusFlags
fn from_iter<T: IntoIterator<Item = StatusFlags>>(iterator: T) -> StatusFlags
impl Hash for StatusFlags
fn hash<__H: Hasher>(&self, state: &mut __H)
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl LowerHex for StatusFlags
impl Not for StatusFlags
type Output = StatusFlags
The resulting type after applying the !
operator.
fn not(self) -> StatusFlags
Returns the complement of this set of flags.
impl Octal for StatusFlags
impl Ord for StatusFlags
fn cmp(&self, other: &StatusFlags) -> Ordering
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<StatusFlags> for StatusFlags
fn eq(&self, other: &StatusFlags) -> bool
fn ne(&self, other: &StatusFlags) -> bool
impl PartialOrd<StatusFlags> for StatusFlags
fn partial_cmp(&self, other: &StatusFlags) -> Option<Ordering>
fn lt(&self, other: &StatusFlags) -> bool
fn le(&self, other: &StatusFlags) -> bool
fn gt(&self, other: &StatusFlags) -> bool
fn ge(&self, other: &StatusFlags) -> bool
impl StructuralEq for StatusFlags
impl StructuralPartialEq for StatusFlags
impl Sub<StatusFlags> for StatusFlags
type Output = StatusFlags
The resulting type after applying the -
operator.
fn sub(self, other: StatusFlags) -> StatusFlags
Returns the set difference of the two sets of flags.
impl SubAssign<StatusFlags> for StatusFlags
fn sub_assign(&mut self, other: StatusFlags)
Disables all flags enabled in the set.
impl UpperHex for StatusFlags
Auto Trait Implementations
impl RefUnwindSafe for StatusFlags
impl Send for StatusFlags
impl Sync for StatusFlags
impl Unpin for StatusFlags
impl UnwindSafe for StatusFlags
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,