pub struct Handle<T> { /* private fields */ }Expand description
A stable handle to allocated memory.
Handles remain valid across relocations. The actual pointer is resolved at access time.
Implementations§
Source§impl<T> Handle<T>
impl<T> Handle<T>
Sourcepub fn is_dangling(&self) -> bool
pub fn is_dangling(&self) -> bool
Check if this is a dangling/invalid handle.
Sourcepub fn raw_generation(&self) -> u32
pub fn raw_generation(&self) -> u32
Get the generation (for debugging).
Trait Implementations§
impl<T> Copy for Handle<T>
impl<T> Eq for Handle<T>
Auto Trait Implementations§
impl<T> Freeze for Handle<T>
impl<T> RefUnwindSafe for Handle<T>where
T: RefUnwindSafe,
impl<T> Send for Handle<T>where
T: Send,
impl<T> Sync for Handle<T>where
T: Sync,
impl<T> Unpin for Handle<T>where
T: Unpin,
impl<T> UnwindSafe for Handle<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