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 Freeze for InstanceConfig
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
Source§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