Struct wasmi_core::F64

source ·
pub struct F64(_);
Expand description

A NaN preserving f64 type.

Implementations§

source§

impl F64

source

pub fn from_bits(other: u64) -> Self

source

pub fn to_bits(self) -> u64

source

pub fn from_float(fl: f64) -> Self

source

pub fn to_float(self) -> f64

source

pub fn is_nan(self) -> bool

source

pub fn abs(self) -> Self

source

pub fn fract(self) -> Self

source

pub fn min(self, other: Self) -> Self

source

pub fn max(self, other: Self) -> Self

Trait Implementations§

source§

impl<T: Into<F64>> Add<T> for F64

§

type Output = F64

The resulting type after applying the + operator.
source§

fn add(self, other: T) -> Self

Performs the + operation. Read more
source§

impl ArithmeticOps<F64> for F64

source§

fn add(self, other: F64) -> F64

Add two values.
source§

fn sub(self, other: F64) -> F64

Subtract two values.
source§

fn mul(self, other: F64) -> F64

Multiply two values.
source§

fn div(self, other: F64) -> Result<F64, TrapCode>

Divide two values.
source§

impl Clone for F64

source§

fn clone(&self) -> F64

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 F64

source§

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

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

impl<T: Into<F64>> Div<T> for F64

§

type Output = F64

The resulting type after applying the / operator.
source§

fn div(self, other: T) -> Self

Performs the / operation. Read more
source§

impl ExtendInto<F64> for F32

source§

fn extend_into(self) -> F64

Convert one type to another by extending with leading zeroes.
source§

impl ExtendInto<F64> for f32

source§

fn extend_into(self) -> F64

Convert one type to another by extending with leading zeroes.
source§

impl ExtendInto<F64> for i32

source§

fn extend_into(self) -> F64

Convert one type to another by extending with leading zeroes.
source§

impl ExtendInto<F64> for i64

source§

fn extend_into(self) -> F64

Convert one type to another by extending with leading zeroes.
source§

impl ExtendInto<F64> for u32

source§

fn extend_into(self) -> F64

Convert one type to another by extending with leading zeroes.
source§

impl ExtendInto<F64> for u64

source§

fn extend_into(self) -> F64

Convert one type to another by extending with leading zeroes.
source§

impl Float<F64> for F64

source§

fn abs(self) -> F64

Get absolute value.
source§

fn floor(self) -> F64

Returns the largest integer less than or equal to a number.
source§

fn ceil(self) -> F64

Returns the smallest integer greater than or equal to a number.
source§

fn trunc(self) -> F64

Returns the integer part of a number.
source§

fn round(self) -> F64

Returns the nearest integer to a number. Round half-way cases away from 0.0.
source§

fn nearest(self) -> F64

Returns the nearest integer to a number. Ties are round to even number.
source§

fn sqrt(self) -> F64

Takes the square root of a number.
source§

fn is_sign_positive(self) -> bool

Returns true if the sign of the number is positive.
source§

fn is_sign_negative(self) -> bool

Returns true if the sign of the number is negative.
source§

fn min(self, other: F64) -> F64

Returns the minimum of the two numbers.
source§

fn max(self, other: F64) -> F64

Returns the maximum of the two numbers.
source§

fn copysign(self, other: F64) -> F64

Sets sign of this value to the sign of other value.
source§

impl From<F64> for UntypedValue

source§

fn from(value: F64) -> Self

Converts to this type from the input type.
source§

impl From<F64> for Value

source§

fn from(val: F64) -> Self

Converts to this type from the input type.
source§

impl From<F64> for f64

source§

fn from(other: F64) -> f64

Converts to this type from the input type.
source§

impl From<F64> for u64

source§

fn from(other: F64) -> Self

Converts to this type from the input type.
source§

impl From<UntypedValue> for F64

source§

fn from(untyped: UntypedValue) -> Self

Converts to this type from the input type.
source§

impl From<f64> for F64

source§

fn from(other: f64) -> F64

Converts to this type from the input type.
source§

impl From<u64> for F64

source§

fn from(other: u64) -> Self

Converts to this type from the input type.
source§

impl FromValue for F64

source§

fn from_value(val: Value) -> Option<Self>

Create a value of type Self from a given Value. Read more
source§

impl LittleEndianConvert for F64

§

type Bytes = <u64 as LittleEndianConvert>::Bytes

The little endian bytes representation.
source§

fn into_le_bytes(self) -> Self::Bytes

Converts self into little endian bytes.
source§

fn from_le_bytes(bytes: Self::Bytes) -> Self

Converts little endian bytes into Self.
source§

impl<T: Into<F64>> Mul<T> for F64

§

type Output = F64

The resulting type after applying the * operator.
source§

fn mul(self, other: T) -> Self

Performs the * operation. Read more
source§

impl Neg for F64

§

type Output = F64

The resulting type after applying the - operator.
source§

fn neg(self) -> Self

Performs the unary - operation. Read more
source§

impl<T: Into<F64> + Copy> PartialEq<T> for F64

source§

fn eq(&self, other: &T) -> 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<T: Into<F64> + Copy> PartialOrd<T> for F64

source§

fn partial_cmp(&self, other: &T) -> 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<T: Into<F64>> Rem<T> for F64

§

type Output = F64

The resulting type after applying the % operator.
source§

fn rem(self, other: T) -> Self

Performs the % operation. Read more
source§

impl<T: Into<F64>> Sub<T> for F64

§

type Output = F64

The resulting type after applying the - operator.
source§

fn sub(self, other: T) -> Self

Performs the - operation. Read more
source§

impl TransmuteInto<F64> for F64

source§

fn transmute_into(self) -> F64

Reinterprets the bits of a value of one type as another type.
source§

impl TransmuteInto<F64> for f64

source§

fn transmute_into(self) -> F64

Reinterprets the bits of a value of one type as another type.
source§

impl TransmuteInto<F64> for i64

source§

fn transmute_into(self) -> F64

Reinterprets the bits of a value of one type as another type.
source§

impl TransmuteInto<F64> for u64

source§

fn transmute_into(self) -> F64

Reinterprets the bits of a value of one type as another type.
source§

impl TransmuteInto<f64> for F64

source§

fn transmute_into(self) -> f64

Reinterprets the bits of a value of one type as another type.
source§

impl TransmuteInto<i64> for F64

source§

fn transmute_into(self) -> i64

Reinterprets the bits of a value of one type as another type.
source§

impl TransmuteInto<u64> for F64

source§

fn transmute_into(self) -> u64

Reinterprets the bits of a value of one type as another type.
source§

impl TruncateSaturateInto<i32> for F64

source§

fn truncate_saturate_into(self) -> i32

Convert one type to another by rounding to the nearest integer towards zero.
source§

impl TruncateSaturateInto<i64> for F64

source§

fn truncate_saturate_into(self) -> i64

Convert one type to another by rounding to the nearest integer towards zero.
source§

impl TruncateSaturateInto<u32> for F64

source§

fn truncate_saturate_into(self) -> u32

Convert one type to another by rounding to the nearest integer towards zero.
source§

impl TruncateSaturateInto<u64> for F64

source§

fn truncate_saturate_into(self) -> u64

Convert one type to another by rounding to the nearest integer towards zero.
source§

impl TryTruncateInto<i32, TrapCode> for F64

source§

fn try_truncate_into(self) -> Result<i32, TrapCode>

Convert one type to another by rounding to the nearest integer towards zero.
source§

impl TryTruncateInto<i64, TrapCode> for F64

source§

fn try_truncate_into(self) -> Result<i64, TrapCode>

Convert one type to another by rounding to the nearest integer towards zero.
source§

impl TryTruncateInto<u32, TrapCode> for F64

source§

fn try_truncate_into(self) -> Result<u32, TrapCode>

Convert one type to another by rounding to the nearest integer towards zero.
source§

impl TryTruncateInto<u64, TrapCode> for F64

source§

fn try_truncate_into(self) -> Result<u64, TrapCode>

Convert one type to another by rounding to the nearest integer towards zero.
source§

impl WrapInto<F32> for F64

source§

fn wrap_into(self) -> F32

Convert one type to another by wrapping.
source§

impl Copy for F64

Auto Trait Implementations§

§

impl RefUnwindSafe for F64

§

impl Send for F64

§

impl Sync for F64

§

impl Unpin for F64

§

impl UnwindSafe for F64

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T1> DecodeUntypedSlice for T1where T1: From<UntypedValue>,

source§

fn decode_untyped_slice(results: &[UntypedValue]) -> Result<T1, UntypedError>

Decodes the slice of UntypedValue as a value of type Self. Read more
source§

impl<T> Downcast for Twhere T: Any,

source§

fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
source§

impl<T> DowncastSync for Twhere T: Any + Send + Sync,

source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T1> EncodeUntypedSlice for T1where T1: Into<UntypedValue>,

source§

fn encode_untyped_slice( self, results: &mut [UntypedValue] ) -> Result<(), UntypedError>

Encodes the slice of UntypedValue from the given value of type Self. 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 Twhere 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 Twhere 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, U> TryFrom<U> for Twhere 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 Twhere 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.
source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for Twhere T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,