Struct wasmi_core::F32
source · pub struct F32(_);
Expand description
A NaN preserving f32
type.
Implementations§
source§impl F32
impl F32
pub fn from_bits(other: u32) -> Self
pub fn to_bits(self) -> u32
pub fn from_float(fl: f32) -> Self
pub fn to_float(self) -> f32
pub fn is_nan(self) -> bool
pub fn abs(self) -> Self
pub fn fract(self) -> Self
pub fn min(self, other: Self) -> Self
pub fn max(self, other: Self) -> Self
Trait Implementations§
source§impl ArithmeticOps<F32> for F32
impl ArithmeticOps<F32> for F32
source§impl ExtendInto<F32> for i32
impl ExtendInto<F32> for i32
source§fn extend_into(self) -> F32
fn extend_into(self) -> F32
Convert one type to another by extending with leading zeroes.
source§impl ExtendInto<F32> for u32
impl ExtendInto<F32> for u32
source§fn extend_into(self) -> F32
fn extend_into(self) -> F32
Convert one type to another by extending with leading zeroes.
source§impl ExtendInto<F64> for F32
impl ExtendInto<F64> for F32
source§fn extend_into(self) -> F64
fn extend_into(self) -> F64
Convert one type to another by extending with leading zeroes.
source§impl Float<F32> for F32
impl Float<F32> for F32
source§fn round(self) -> F32
fn round(self) -> F32
Returns the nearest integer to a number. Round half-way cases away from 0.0.
source§fn nearest(self) -> F32
fn nearest(self) -> F32
Returns the nearest integer to a number. Ties are round to even number.
source§fn is_sign_positive(self) -> bool
fn is_sign_positive(self) -> bool
Returns
true
if the sign of the number is positive.source§fn is_sign_negative(self) -> bool
fn is_sign_negative(self) -> bool
Returns
true
if the sign of the number is negative.source§impl From<F32> for UntypedValue
impl From<F32> for UntypedValue
source§impl From<UntypedValue> for F32
impl From<UntypedValue> for F32
source§fn from(untyped: UntypedValue) -> Self
fn from(untyped: UntypedValue) -> Self
Converts to this type from the input type.
source§impl LittleEndianConvert for F32
impl LittleEndianConvert for F32
§type Bytes = <u32 as LittleEndianConvert>::Bytes
type Bytes = <u32 as LittleEndianConvert>::Bytes
The little endian bytes representation.
source§fn into_le_bytes(self) -> Self::Bytes
fn into_le_bytes(self) -> Self::Bytes
Converts
self
into little endian bytes.source§fn from_le_bytes(bytes: Self::Bytes) -> Self
fn from_le_bytes(bytes: Self::Bytes) -> Self
Converts little endian bytes into
Self
.source§impl<T: Into<F32> + Copy> PartialOrd<T> for F32
impl<T: Into<F32> + Copy> PartialOrd<T> for F32
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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 moresource§impl TransmuteInto<F32> for F32
impl TransmuteInto<F32> for F32
source§fn transmute_into(self) -> F32
fn transmute_into(self) -> F32
Reinterprets the bits of a value of one type as another type.
source§impl TransmuteInto<F32> for f32
impl TransmuteInto<F32> for f32
source§fn transmute_into(self) -> F32
fn transmute_into(self) -> F32
Reinterprets the bits of a value of one type as another type.
source§impl TransmuteInto<F32> for i32
impl TransmuteInto<F32> for i32
source§fn transmute_into(self) -> F32
fn transmute_into(self) -> F32
Reinterprets the bits of a value of one type as another type.
source§impl TransmuteInto<F32> for u32
impl TransmuteInto<F32> for u32
source§fn transmute_into(self) -> F32
fn transmute_into(self) -> F32
Reinterprets the bits of a value of one type as another type.
source§impl TransmuteInto<f32> for F32
impl TransmuteInto<f32> for F32
source§fn transmute_into(self) -> f32
fn transmute_into(self) -> f32
Reinterprets the bits of a value of one type as another type.
source§impl TransmuteInto<i32> for F32
impl TransmuteInto<i32> for F32
source§fn transmute_into(self) -> i32
fn transmute_into(self) -> i32
Reinterprets the bits of a value of one type as another type.
source§impl TransmuteInto<u32> for F32
impl TransmuteInto<u32> for F32
source§fn transmute_into(self) -> u32
fn transmute_into(self) -> u32
Reinterprets the bits of a value of one type as another type.
source§impl TruncateSaturateInto<i32> for F32
impl TruncateSaturateInto<i32> for F32
source§fn truncate_saturate_into(self) -> i32
fn truncate_saturate_into(self) -> i32
Convert one type to another by rounding to the nearest integer towards zero.
source§impl TruncateSaturateInto<i64> for F32
impl TruncateSaturateInto<i64> for F32
source§fn truncate_saturate_into(self) -> i64
fn truncate_saturate_into(self) -> i64
Convert one type to another by rounding to the nearest integer towards zero.
source§impl TruncateSaturateInto<u32> for F32
impl TruncateSaturateInto<u32> for F32
source§fn truncate_saturate_into(self) -> u32
fn truncate_saturate_into(self) -> u32
Convert one type to another by rounding to the nearest integer towards zero.
source§impl TruncateSaturateInto<u64> for F32
impl TruncateSaturateInto<u64> for F32
source§fn truncate_saturate_into(self) -> u64
fn truncate_saturate_into(self) -> u64
Convert one type to another by rounding to the nearest integer towards zero.
impl Copy for F32
Auto Trait Implementations§
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> 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
source§impl<T1> DecodeUntypedSlice for T1where
T1: From<UntypedValue>,
impl<T1> DecodeUntypedSlice for T1where T1: From<UntypedValue>,
source§fn decode_untyped_slice(results: &[UntypedValue]) -> Result<T1, UntypedError>
fn decode_untyped_slice(results: &[UntypedValue]) -> Result<T1, UntypedError>
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
source§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
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>
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)
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)
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.