pub struct GcHandle { /* private fields */ }Expand description
Keeps an object alive and findable after the garbage collector moves or would free it. The collector doesn’t scan Rust memory, so objects kept between calls (in statics or closures) need one. Freed on drop.
Implementations§
Trait Implementations§
Auto Trait Implementations§
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