Struct wasmer_types::InstanceConfig
source · pub struct InstanceConfig {
pub gas_counter: *mut FastGasCounter,
pub stack_limit: i32,
/* private fields */
}
Expand description
External configuration of execution environment for Instance.
Fields§
§gas_counter: *mut FastGasCounter
External gas counter pointer.
stack_limit: i32
Stack limit, in 8-byte slots.
Implementations§
source§impl InstanceConfig
impl InstanceConfig
sourcepub unsafe fn with_counter(self, gas_counter: *mut FastGasCounter) -> Self
pub unsafe fn with_counter(self, gas_counter: *mut FastGasCounter) -> Self
Create instance configuration with an external gas counter, unsafe as it creates
an alias on raw memory of gas_counter. This memory could be accessed until
instance configured with this InstanceConfig
exists.
sourcepub unsafe fn with_stack_limit(self, stack_limit: i32) -> Self
pub unsafe fn with_stack_limit(self, stack_limit: i32) -> Self
Create instance configuration with given stack limit.
Trait Implementations§
source§impl Clone for InstanceConfig
impl Clone for InstanceConfig
source§fn clone(&self) -> InstanceConfig
fn clone(&self) -> InstanceConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for InstanceConfig
impl !Send for InstanceConfig
impl !Sync for InstanceConfig
impl Unpin for InstanceConfig
impl !UnwindSafe for InstanceConfig
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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