pub struct EntityList<E: IEntityListNode> {
pub head: PtrID<E>,
pub tail: PtrID<E>,
pub len: Cell<usize>,
}Fields§
§head: PtrID<E>§tail: PtrID<E>§len: Cell<usize>Implementations§
Source§impl<E: IEntityListNode> EntityList<E>
impl<E: IEntityListNode> EntityList<E>
pub fn new(alloc: &EntityAlloc<E>) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get_front_id(&self, alloc: &EntityAlloc<E>) -> Option<PtrID<E>>
pub fn get_back_id(&self, alloc: &EntityAlloc<E>) -> Option<PtrID<E>>
pub fn node_add_next( &self, node: PtrID<E>, new_node: PtrID<E>, alloc: &EntityAlloc<E>, ) -> PtrListRes<E>
pub fn node_add_prev( &self, node: PtrID<E>, new_node: PtrID<E>, alloc: &EntityAlloc<E>, ) -> PtrListRes<E>
pub fn node_unplug( &self, node: PtrID<E>, alloc: &EntityAlloc<E>, ) -> PtrListRes<E>
pub fn push_back_id( &self, new_node: PtrID<E>, alloc: &EntityAlloc<E>, ) -> PtrListRes<E>
pub fn push_front_id( &self, new_node: PtrID<E>, alloc: &EntityAlloc<E>, ) -> PtrListRes<E>
pub fn push_back_val(&self, val: E, alloc: &EntityAlloc<E>) -> PtrListRes<E>
pub fn push_front_val(&self, val: E, alloc: &EntityAlloc<E>) -> PtrListRes<E>
pub fn pop_back(&self, alloc: &EntityAlloc<E>) -> PtrListRes<E, PtrID<E>>
pub fn pop_front(&self, alloc: &EntityAlloc<E>) -> PtrListRes<E, PtrID<E>>
pub fn foreach(&self, alloc: &EntityAlloc<E>, f: impl FnMut(PtrID<E>, &E))
pub fn forall_with_sentinel( &self, alloc: &EntityAlloc<E>, f: impl FnMut(PtrID<E>, &E) -> bool, ) -> bool
pub fn get_range(&self, alloc: &EntityAlloc<E>) -> EntityListRange<E>
Sourcepub fn get_range_with_sentinels(&self) -> EntityListRange<E>
pub fn get_range_with_sentinels(&self) -> EntityListRange<E>
Get the range including sentinels.
pub fn iter<'alloc>( &'alloc self, alloc: &'alloc EntityAlloc<E>, ) -> EntityListReadIter<'alloc, E> ⓘ
pub fn iter_with_sentinels<'alloc>( &'alloc self, alloc: &'alloc EntityAlloc<E>, ) -> EntityListReadIter<'alloc, E> ⓘ
Auto Trait Implementations§
impl<E> !Freeze for EntityList<E>
impl<E> !RefUnwindSafe for EntityList<E>
impl<E> Send for EntityList<E>where
E: Send,
impl<E> !Sync for EntityList<E>
impl<E> Unpin for EntityList<E>
impl<E> UnwindSafe for EntityList<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