pub trait UserData: Any {
fn dtable_gcraw(&self) -> GcRaw<DispatchTable>;
fn as_any(&self) -> &dyn Any;
unsafe fn dtable(&self) -> &DispatchTable { ... }
fn visit_references(&self, _visit: &mut dyn FnMut(RawValue)) { ... }
}
Required Methods§
sourcefn dtable_gcraw(&self) -> GcRaw<DispatchTable>
fn dtable_gcraw(&self) -> GcRaw<DispatchTable>
Returns a GC reference to the user data’s dispatch table.
fn as_any(&self) -> &dyn Any
Provided Methods§
sourceunsafe fn dtable(&self) -> &DispatchTable
unsafe fn dtable(&self) -> &DispatchTable
Returns the user data’s dispatch table.
Safety
This is basically sugar for dtable_gcraw().get()
, so all the footguns of GcRaw::get
apply.