Struct wasmtime_runtime::VMGlobalDefinition

source ·
#[repr(C, align(16))]
pub struct VMGlobalDefinition { /* private fields */ }
Expand description

The storage for a WebAssembly global defined within the instance.

TODO: Pack the globals more densely, rather than using the same size for every type.

Implementations§

source§

impl VMGlobalDefinition

source

pub fn new() -> Self

Construct a VMGlobalDefinition.

source

pub unsafe fn as_i32(&self) -> &i32

Return a reference to the value as an i32.

source

pub unsafe fn as_i32_mut(&mut self) -> &mut i32

Return a mutable reference to the value as an i32.

source

pub unsafe fn as_u32(&self) -> &u32

Return a reference to the value as a u32.

source

pub unsafe fn as_u32_mut(&mut self) -> &mut u32

Return a mutable reference to the value as an u32.

source

pub unsafe fn as_i64(&self) -> &i64

Return a reference to the value as an i64.

source

pub unsafe fn as_i64_mut(&mut self) -> &mut i64

Return a mutable reference to the value as an i64.

source

pub unsafe fn as_u64(&self) -> &u64

Return a reference to the value as an u64.

source

pub unsafe fn as_u64_mut(&mut self) -> &mut u64

Return a mutable reference to the value as an u64.

source

pub unsafe fn as_f32(&self) -> &f32

Return a reference to the value as an f32.

source

pub unsafe fn as_f32_mut(&mut self) -> &mut f32

Return a mutable reference to the value as an f32.

source

pub unsafe fn as_f32_bits(&self) -> &u32

Return a reference to the value as f32 bits.

source

pub unsafe fn as_f32_bits_mut(&mut self) -> &mut u32

Return a mutable reference to the value as f32 bits.

source

pub unsafe fn as_f64(&self) -> &f64

Return a reference to the value as an f64.

source

pub unsafe fn as_f64_mut(&mut self) -> &mut f64

Return a mutable reference to the value as an f64.

source

pub unsafe fn as_f64_bits(&self) -> &u64

Return a reference to the value as f64 bits.

source

pub unsafe fn as_f64_bits_mut(&mut self) -> &mut u64

Return a mutable reference to the value as f64 bits.

source

pub unsafe fn as_u128(&self) -> &u128

Return a reference to the value as an u128.

source

pub unsafe fn as_u128_mut(&mut self) -> &mut u128

Return a mutable reference to the value as an u128.

source

pub unsafe fn as_u128_bits(&self) -> &[u8; 16]

Return a reference to the value as u128 bits.

source

pub unsafe fn as_u128_bits_mut(&mut self) -> &mut [u8; 16]

Return a mutable reference to the value as u128 bits.

source

pub unsafe fn as_externref(&self) -> &Option<VMExternRef>

Return a reference to the value as an externref.

source

pub unsafe fn as_externref_mut(&mut self) -> &mut Option<VMExternRef>

Return a mutable reference to the value as an externref.

source

pub unsafe fn as_func_ref(&self) -> *mut VMFuncRef

Return a reference to the value as a VMFuncRef.

source

pub unsafe fn as_func_ref_mut(&mut self) -> &mut *mut VMFuncRef

Return a mutable reference to the value as a VMFuncRef.

Trait Implementations§

source§

impl Debug for VMGlobalDefinition

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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.