pub struct PtrID<E: IEntityAllocatable>(/* private fields */);Implementations§
Source§impl<E: IEntityRingListNode> PtrID<E>
impl<E: IEntityRingListNode> PtrID<E>
pub fn detach(self, alloc: &EntityAlloc<E>) -> PtrListRes<E>
Source§impl<E: IEntityAllocatable> PtrID<E>
impl<E: IEntityAllocatable> PtrID<E>
pub unsafe fn direct_get_indexed(self) -> usize
pub unsafe fn direct_deref<'a>(self) -> &'a E
pub unsafe fn direct_deref_mut<'a>(self) -> &'a mut E
pub fn as_indexed(self, alloc: &EntityAlloc<E>) -> Option<IndexedID<E>>
Sourcepub fn as_unit_pointer(self) -> *const Unit<E>
pub fn as_unit_pointer(self) -> *const Unit<E>
Get a raw pointer to the Unit
Returning a raw pointer is safe; dereferencing it remains unsafe and the caller must ensure the pointed unit is still allocated and valid.
Trait Implementations§
Source§impl<E: IEntityAllocatable> Clone for PtrID<E>
impl<E: IEntityAllocatable> Clone for PtrID<E>
Source§impl<E: IEntityAllocatable> Debug for PtrID<E>
impl<E: IEntityAllocatable> Debug for PtrID<E>
Source§impl<E: IEntityAllocatable> Hash for PtrID<E>
impl<E: IEntityAllocatable> Hash for PtrID<E>
Source§impl<E: IEntityAllocatable> IEntityAllocID<E> for PtrID<E>
impl<E: IEntityAllocatable> IEntityAllocID<E> for PtrID<E>
fn from_ptr(_: &EntityAlloc<E>, ptr: PtrID<E>) -> Option<Self>
fn from_index(alloc: &EntityAlloc<E>, indexed: usize) -> Option<Self>
fn try_deref(self, alloc: &EntityAlloc<E>) -> Option<&E>
fn try_deref_mut(self, alloc: &mut EntityAlloc<E>) -> Option<&mut E>
fn free(self, alloc: &mut EntityAlloc<E>) -> Option<E>
fn deref(self, alloc: &EntityAlloc<E>) -> &E
fn deref_mut(self, alloc: &mut EntityAlloc<E>) -> &mut E
Source§impl<E: IEntityAllocatable> Ord for PtrID<E>
impl<E: IEntityAllocatable> Ord for PtrID<E>
Source§impl<E: IEntityAllocatable> PartialEq for PtrID<E>
impl<E: IEntityAllocatable> PartialEq for PtrID<E>
Source§impl<E: IEntityAllocatable> PartialOrd for PtrID<E>
impl<E: IEntityAllocatable> PartialOrd for PtrID<E>
Source§impl<E: IEntityAllocatable> Pointer for PtrID<E>
impl<E: IEntityAllocatable> Pointer for PtrID<E>
impl<E: IEntityAllocatable> Copy for PtrID<E>
impl<E: IEntityAllocatable> Eq for PtrID<E>
impl<E: Send + IEntityAllocatable> Send for PtrID<E>
impl<E: Sync + IEntityAllocatable> Sync for PtrID<E>
Auto Trait Implementations§
impl<E> Freeze for PtrID<E>
impl<E> RefUnwindSafe for PtrID<E>where
E: RefUnwindSafe,
impl<E> Unpin for PtrID<E>
impl<E> UnwindSafe for PtrID<E>where
E: 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