Struct wasm::value::F32

source ·
pub struct F32(pub f32);

Tuple Fields§

§0: f32

Implementations§

source§

impl F32

source

pub fn abs(&self) -> Self

source

pub fn neg(&self) -> Self

source

pub fn ceil(&self) -> Self

source

pub fn floor(&self) -> Self

source

pub fn trunc(&self) -> Self

source

pub fn round(&self) -> Self

source

pub fn sqrt(&self) -> Self

source

pub fn min(&self, rhs: Self) -> Self

source

pub fn max(&self, rhs: Self) -> Self

source

pub fn copysign(&self, rhs: Self) -> Self

source

pub fn from_bits(other: u32) -> Self

source

pub fn is_nan(&self) -> bool

source

pub fn is_infinity(&self) -> bool

source

pub fn as_i32(&self) -> i32

source

pub fn as_u32(&self) -> u32

source

pub fn as_i64(&self) -> i64

source

pub fn as_u64(&self) -> u64

source

pub fn as_f32(&self) -> F64

source

pub fn reinterpret_as_i32(&self) -> i32

Trait Implementations§

source§

impl Add for F32

§

type Output = F32

The resulting type after applying the + operator.
source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
source§

impl Clone for F32

source§

fn clone(&self) -> F32

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 F32

source§

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

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

impl Display for F32

source§

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

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

impl Div for F32

§

type Output = F32

The resulting type after applying the / operator.
source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
source§

impl From<F32> for Value

source§

fn from(x: F32) -> Self

Converts to this type from the input type.
source§

impl From<Value> for F32

source§

fn from(value: Value) -> Self

Converts to this type from the input type.
source§

impl InteropValue for F32

source§

const TY: ValType = _

source§

fn into_value(self) -> Value

source§

fn from_value(value: Value) -> Self

source§

impl Mul for F32

§

type Output = F32

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
source§

impl PartialEq for F32

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for F32

source§

fn partial_cmp(&self, other: &F32) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Sub for F32

§

type Output = F32

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
source§

impl Copy for F32

Auto Trait Implementations§

§

impl Freeze for F32

§

impl RefUnwindSafe for F32

§

impl Send for F32

§

impl Sync for F32

§

impl Unpin for F32

§

impl UnwindSafe for F32

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<A> InteropValueList for A
where A: InteropValue,

source§

const TYS: &'static [ValType] = const TYS: &'static [ValType] = &[A::TY];

source§

fn into_values(self) -> Vec<Value>

source§

fn from_values(values: impl Iterator<Item = Value>) -> A

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
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.