Struct fpopt::FEnv

source ·
pub struct FEnv(/* private fields */);
Expand description

A wrapper around the floating point environment.

visit: https://cplusplus.com/reference/cfenv/fenv_t/ for more information about the underlying fenv_t type.

Implementations§

source§

impl FEnv

source

pub fn new() -> Result<Self, NonZeroI32>

source

pub fn hold(&mut self) -> Result<(), NonZeroI32>

visit: https://en.cppreference.com/w/c/numeric/fenv/feholdexcept

source

pub fn set(&self) -> Result<(), NonZeroI32>

visit: https://en.cppreference.com/w/c/numeric/fenv/feenv

source

pub fn get(&mut self) -> Result<(), NonZeroI32>

visit: https://en.cppreference.com/w/c/numeric/fenv/feenv

source

pub fn update(&self) -> Result<(), NonZeroI32>

visit:

source

pub fn inner(&self) -> &fenv_t

source

pub fn inner_mut(&mut self) -> &mut fenv_t

Methods from Deref<Target = fenv_t>§

source

pub fn __opcode(&self) -> c_uint

source

pub fn set___opcode(&mut self, val: c_uint)

source

pub fn __glibc_reserved4(&self) -> c_uint

source

pub fn set___glibc_reserved4(&mut self, val: c_uint)

Trait Implementations§

source§

impl Clone for FEnv

source§

fn clone(&self) -> FEnv

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FEnv

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Deref for FEnv

§

type Target = fenv_t

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl DerefMut for FEnv

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

Auto Trait Implementations§

§

impl Freeze for FEnv

§

impl RefUnwindSafe for FEnv

§

impl Send for FEnv

§

impl Sync for FEnv

§

impl Unpin for FEnv

§

impl UnwindSafe for FEnv

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.