Type Alias Value

Source
pub type Value = FizzyValue;
Expand description

A WebAssembly value of i32/i64/f32/f64.

Aliased Type§

union Value {
    pub i32: u32,
    pub i64: u64,
    pub f32: f32,
    pub f64: f64,
    /* private fields */
}

Fields§

§i32: u32

32-bit integer value.

§i64: u64

64-bit integer value.

§f32: f32

32-bit floating-point value.

§f64: f64

64-bit floating-point value.

Implementations§

Source§

impl Value

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) -> f32

Source

pub fn as_f64(&self) -> f64

Trait Implementations§

Source§

impl From<f32> for Value

Source§

fn from(v: f32) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for Value

Source§

fn from(v: f64) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for Value

Source§

fn from(v: i32) -> Self

Converts to this type from the input type.
Source§

impl From<i64> for Value

Source§

fn from(v: i64) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for Value

Source§

fn from(v: u32) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for Value

Source§

fn from(v: u64) -> Self

Converts to this type from the input type.