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
sourceimpl 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
sourceimpl MemoryUsage for VMTable
impl MemoryUsage for VMTable
sourcefn size_of_val(&self, visited: &mut dyn MemoryUsageTracker) -> usize
fn size_of_val(&self, visited: &mut dyn MemoryUsageTracker) -> usize
Returns the size of the referenced value in bytes. Read more
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)
Auto Trait Implementations
Blanket Implementations
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
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.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
sourceimpl<T> Upcastable for T where
T: 'static + Any + Send + Sync,
impl<T> Upcastable for T where
T: 'static + Any + Send + Sync,
sourcefn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
sourcefn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref