pub struct Object<T> { /* private fields */ }
Expand description
Represents a custom-typed value stored inside a VM.
Built-in types such as f64
shouldn’t be used as the T
of an Object
, because they are
can be represented by values inherently. Object
however may be used for binding types that are
not directly supported by the VM, like std::fs::File
.
Trait Implementations
sourceimpl<T> UserData for Object<T>where
T: Any,
impl<T> UserData for Object<T>where
T: Any,
sourcefn dtable_gcraw(&self) -> GcRaw<DispatchTable>
fn dtable_gcraw(&self) -> GcRaw<DispatchTable>
Returns a GC reference to the user data’s dispatch table.
sourceunsafe fn dtable(&self) -> &DispatchTable
unsafe fn dtable(&self) -> &DispatchTable
Returns the user data’s dispatch table. Read more
Auto Trait Implementations
impl<T> !RefUnwindSafe for Object<T>
impl<T> !Send for Object<T>
impl<T> !Sync for Object<T>
impl<T> Unpin for Object<T>where
T: Unpin,
impl<T> !UnwindSafe for Object<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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