pub struct Persistent<T: GarbageCollected> { /* private fields */ }Expand description
Persistent is a way to create a strong pointer from an off-heap object to another on-heap object. As long as the Persistent handle is alive the GC will keep the object pointed to alive. The Persistent handle is always a GC root from the point of view of the GC. Persistent must be constructed and destructed in the same thread.
Implementations§
Source§impl<T: GarbageCollected> Persistent<T>
impl<T: GarbageCollected> Persistent<T>
Trait Implementations§
Source§impl<T: GarbageCollected> Debug for Persistent<T>
impl<T: GarbageCollected> Debug for Persistent<T>
Source§impl<T: GarbageCollected> Drop for Persistent<T>
impl<T: GarbageCollected> Drop for Persistent<T>
Auto Trait Implementations§
impl<T> Freeze for Persistent<T>
impl<T> RefUnwindSafe for Persistent<T>where
T: RefUnwindSafe,
impl<T> !Send for Persistent<T>
impl<T> !Sync for Persistent<T>
impl<T> Unpin for Persistent<T>where
T: Unpin,
impl<T> UnsafeUnpin for Persistent<T>
impl<T> UnwindSafe for Persistent<T>where
T: UnwindSafe,
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