Struct wasmer_vm::Global [−][src]
pub struct Global { /* fields omitted */ }
Expand description
A Global instance
Implementations
Create a new, zero bit-pattern initialized global from a GlobalType
.
Get the type of the global.
Get a pointer to the underlying definition used by the generated code.
Get a value from the global.
Set a value for the global.
Safety
The caller should check that the val
comes from the same store as this global.
pub unsafe fn set_unchecked<T: WasmValueType>(
&self,
val: Value<T>
) -> Result<(), GlobalError>
[src]
pub unsafe fn set_unchecked<T: WasmValueType>(
&self,
val: Value<T>
) -> Result<(), GlobalError>
[src]Set a value from the global (unchecked)
Safety
The caller should check that the val
comes from the same store as this global.
The caller should also ensure that this global is synchronized. Otherwise, use
set
instead.
Trait Implementations
Returns the size of the referenced value in bytes. Read more
Safety
This is safe to send between threads because there is no-thread specific logic.
TODO: look into other reasons that make something not Send
Safety
This is safe to share between threads because it uses a Mutex
internally.
Auto Trait Implementations
Blanket Implementations
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Mutably borrows from an owned value. Read more