pub struct GcHandle { /* private fields */ }Expand description
Opaque handle token for a RunMat GC allocation.
GcHandle is intentionally not Send or Sync; a handle does not prove that
the pointed-to object can be accessed safely from another thread.
ⓘ
fn assert_send<T: Send>() {}
assert_send::<runmat_gc_api::GcHandle>();ⓘ
fn assert_sync<T: Sync>() {}
assert_sync::<runmat_gc_api::GcHandle>();ⓘ
fn deref(handle: runmat_gc_api::GcHandle) {
let _ = *handle;
}ⓘ
use std::ops::Deref;
fn deref_method(handle: runmat_gc_api::GcHandle) {
let _ = handle.deref();
}ⓘ
fn mutable_reference(mut handle: runmat_gc_api::GcHandle) {
let _: &mut _ = &mut *handle;
}Implementations§
Trait Implementations§
impl Copy for GcHandle
impl Eq for GcHandle
Auto Trait Implementations§
impl !Send for GcHandle
impl !Sync for GcHandle
impl Freeze for GcHandle
impl RefUnwindSafe for GcHandle
impl Unpin for GcHandle
impl UnsafeUnpin for GcHandle
impl UnwindSafe for GcHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more