pub struct VMTable {
pub from: Arc<dyn Table>,
pub instance_ref: Option<WeakOrStrongInstanceRef>,
}
Expand description
A table export value.
Fields§
§from: Arc<dyn Table>
Pointer to the containing Table
.
instance_ref: Option<WeakOrStrongInstanceRef>
A “reference” to the instance through the
InstanceRef
. None
if it is a host table.
Implementations§
Source§impl VMTable
impl VMTable
Sourcepub fn style(&self) -> &TableStyle
pub fn style(&self) -> &TableStyle
Get the style for this exported table
Sourcepub fn same(&self, other: &Self) -> bool
pub fn same(&self, other: &Self) -> bool
Returns whether or not the two VMTable
s refer to the same Memory.
Sourcepub fn upgrade_instance_ref(&mut self) -> Option<()>
pub fn upgrade_instance_ref(&mut self) -> Option<()>
Converts the stored instance ref into a strong InstanceRef
if it is weak.
Returns None if it cannot be upgraded.
Trait Implementations§
impl Send for VMTable
§Safety
This is correct because there is no non-threadsafe logic directly in this type;
correct use of the raw table from multiple threads via definition
requires unsafe
and is the responsibilty of the user of this type.
impl Sync for VMTable
§Safety
This is correct because the values directly in definition
should be considered immutable
and the type is both Send
and Clone
(thus marking it Sync
adds no new behavior, it
only makes this type easier to use)