Struct softfloat_wrapper::ExceptionFlags
source · pub struct ExceptionFlags(_);
Expand description
exception flags defined by standard
Examples
use softfloat_wrapper::{ExceptionFlags, Float, RoundingMode, F16};
let a = 0x0;
let b = 0x0;
let a = F16::from_bits(a);
let b = F16::from_bits(b);
let mut flag = ExceptionFlags::default();
flag.set();
let _d = a.div(b, RoundingMode::TiesToEven);
flag.get();
assert!(flag.is_invalid());
Implementations§
source§impl ExceptionFlags
impl ExceptionFlags
pub fn from_bits(x: u8) -> Self
pub fn to_bits(&self) -> u8
pub fn bits(&self) -> u8
👎Deprecated since 0.3.0: Please use to_bits instead
pub fn is_inexact(&self) -> bool
pub fn is_infinite(&self) -> bool
pub fn is_invalid(&self) -> bool
pub fn is_overflow(&self) -> bool
pub fn is_underflow(&self) -> bool
pub fn set(&self)
pub fn get(&mut self)
Trait Implementations§
source§impl Clone for ExceptionFlags
impl Clone for ExceptionFlags
source§fn clone(&self) -> ExceptionFlags
fn clone(&self) -> ExceptionFlags
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ExceptionFlags
impl Debug for ExceptionFlags
source§impl Default for ExceptionFlags
impl Default for ExceptionFlags
source§fn default() -> ExceptionFlags
fn default() -> ExceptionFlags
Returns the “default value” for a type. Read more
impl Copy for ExceptionFlags
Auto Trait Implementations§
impl RefUnwindSafe for ExceptionFlags
impl Send for ExceptionFlags
impl Sync for ExceptionFlags
impl Unpin for ExceptionFlags
impl UnwindSafe for ExceptionFlags
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