pub struct GcBox<T>(/* private fields */);Implementations§
Source§impl<T> GcBox<T>
impl<T> GcBox<T>
pub fn as_ptr(&self) -> *mut T
pub fn as_ref<'gc>(&self, _token: &'gc impl GcToken) -> &'gc T
pub fn as_mut<'gc>(&mut self, _token: &'gc impl GcToken) -> &'gc mut T
Sourcepub unsafe fn as_ref_unconstrained(&self) -> &'static mut T
pub unsafe fn as_ref_unconstrained(&self) -> &'static mut T
§Safety
The returned reference cannot be used in a thread that is not registered with the GC.
Auto Trait Implementations§
impl<T> !Send for GcBox<T>
impl<T> !Sync for GcBox<T>
impl<T> Freeze for GcBox<T>
impl<T> RefUnwindSafe for GcBox<T>where
T: RefUnwindSafe,
impl<T> Unpin for GcBox<T>
impl<T> UnsafeUnpin for GcBox<T>
impl<T> UnwindSafe for GcBox<T>where
T: RefUnwindSafe,
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