pub struct VMComponentOffsets<P> {
pub ptr: P,
pub num_lowerings: u32,
pub num_runtime_memories: u32,
pub num_runtime_tables: u32,
pub num_runtime_reallocs: u32,
pub num_runtime_callbacks: u32,
pub num_runtime_post_returns: u32,
pub num_runtime_component_instances: u32,
pub num_trampolines: u32,
pub num_unsafe_intrinsics: u32,
pub num_resources: u32,
/* private fields */
}Expand description
Runtime offsets within a VMComponentContext for a specific component.
Fields§
§ptr: PThe host pointer size
num_lowerings: u32The number of lowered functions this component will be creating.
num_runtime_memories: u32The number of memories which are recorded in this component for options.
num_runtime_tables: u32The number of tables which are recorded in this component for options.
num_runtime_reallocs: u32The number of reallocs which are recorded in this component for options.
num_runtime_callbacks: u32The number of callbacks which are recorded in this component for options.
num_runtime_post_returns: u32The number of post-returns which are recorded in this component for options.
num_runtime_component_instances: u32Number of component instances internally in the component (always at least 1).
num_trampolines: u32Number of cranelift-compiled trampolines required for this component.
num_unsafe_intrinsics: u32Number of VMFuncRefs for unsafe intrinsics within this component’s
context.
num_resources: u32Number of resources within a component which need destructors stored.
Implementations§
Source§impl<P: PtrSize> VMComponentOffsets<P>
Offsets of the dynamically-positioned fields of VMComponentContext.
impl<P: PtrSize> VMComponentOffsets<P>
Offsets of the dynamically-positioned fields of VMComponentContext.
Sourcepub fn may_leave(&self) -> ArrayOffsets<RuntimeComponentInstanceIndex>
pub fn may_leave(&self) -> ArrayOffsets<RuntimeComponentInstanceIndex>
The offsets of the may_leave array.
Sourcepub fn task_may_block(&self) -> u32
pub fn task_may_block(&self) -> u32
The offset of the task_may_block field.
Sourcepub fn trampoline_func_refs(&self) -> ArrayOffsets<TrampolineIndex>
pub fn trampoline_func_refs(&self) -> ArrayOffsets<TrampolineIndex>
The offsets of the trampoline_func_refs array.
Sourcepub fn intrinsic_func_refs(&self) -> ArrayOffsets<UnsafeIntrinsic>
pub fn intrinsic_func_refs(&self) -> ArrayOffsets<UnsafeIntrinsic>
The offsets of the intrinsic_func_refs array.
Sourcepub fn lowerings(&self) -> ArrayOffsets<LoweredIndex>
pub fn lowerings(&self) -> ArrayOffsets<LoweredIndex>
The offsets of the lowerings array.
Sourcepub fn memories(&self) -> ArrayOffsets<RuntimeMemoryIndex>
pub fn memories(&self) -> ArrayOffsets<RuntimeMemoryIndex>
The offsets of the memories array.
Sourcepub fn tables(&self) -> ArrayOffsets<RuntimeTableIndex>
pub fn tables(&self) -> ArrayOffsets<RuntimeTableIndex>
The offsets of the tables array.
Sourcepub fn reallocs(&self) -> ArrayOffsets<RuntimeReallocIndex>
pub fn reallocs(&self) -> ArrayOffsets<RuntimeReallocIndex>
The offsets of the reallocs array.
Sourcepub fn callbacks(&self) -> ArrayOffsets<RuntimeCallbackIndex>
pub fn callbacks(&self) -> ArrayOffsets<RuntimeCallbackIndex>
The offsets of the callbacks array.
Sourcepub fn post_returns(&self) -> ArrayOffsets<RuntimePostReturnIndex>
pub fn post_returns(&self) -> ArrayOffsets<RuntimePostReturnIndex>
The offsets of the post_returns array.
Sourcepub fn resource_destructors(&self) -> ArrayOffsets<ResourceIndex>
pub fn resource_destructors(&self) -> ArrayOffsets<ResourceIndex>
The offsets of the resource_destructors array.
Sourcepub fn size_of_vmctx(&self) -> u32
pub fn size_of_vmctx(&self) -> u32
Return the size of the VMComponentContext allocation.
Source§impl<P: PtrSize> VMComponentOffsets<P>
impl<P: PtrSize> VMComponentOffsets<P>
Sourcepub fn new(ptr: P, component: &Component) -> Self
pub fn new(ptr: P, component: &Component) -> Self
Creates a new set of offsets for the component specified configured
additionally for the ptr size specified.
Sourcepub fn pointer_size(&self) -> u8
pub fn pointer_size(&self) -> u8
The size, in bytes, of the host pointer.
Sourcepub fn lowering_callee(&self, index: LoweredIndex) -> u32
pub fn lowering_callee(&self, index: LoweredIndex) -> u32
The offset of the callee for the index specified.
Sourcepub fn lowering_data(&self, index: LoweredIndex) -> u32
pub fn lowering_data(&self, index: LoweredIndex) -> u32
The offset of the data for the index specified.
Sourcepub fn lowering_size(&self) -> u8
pub fn lowering_size(&self) -> u8
The size of the VMLowering type
Sourcepub fn lowering_callee_offset(&self) -> u32
pub fn lowering_callee_offset(&self) -> u32
The offset of the callee field within the VMLowering type.
Sourcepub fn lowering_data_offset(&self) -> u32
pub fn lowering_data_offset(&self) -> u32
The offset of the data field within the VMLowering type.
Trait Implementations§
Source§impl<P: Clone> Clone for VMComponentOffsets<P>
impl<P: Clone> Clone for VMComponentOffsets<P>
Source§fn clone(&self) -> VMComponentOffsets<P>
fn clone(&self) -> VMComponentOffsets<P>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more