pub trait IEntityRingListNodeID: IPoliciedID {
// Required methods
fn obj_load_head(obj: &Self::ObjectT) -> EntityListNodeHead<Self>;
fn obj_store_head(obj: &Self::ObjectT, head: EntityListNodeHead<Self>);
fn obj_is_sentinel(obj: &Self::ObjectT) -> bool;
fn new_sentinel_obj() -> Self::ObjectT;
fn on_unplug(
self,
obj: &Self::ObjectT,
alloc: &IDBoundAlloc<Self>,
) -> EntityListRes<Self>;
// Provided methods
fn new_sentinel(alloc: &IDBoundAlloc<Self>) -> Self { ... }
fn is_sentinel(self, alloc: &IDBoundAlloc<Self>) -> bool { ... }
fn get_prev_id(self, alloc: &IDBoundAlloc<Self>) -> Option<Self> { ... }
fn get_next_id(self, alloc: &IDBoundAlloc<Self>) -> Option<Self> { ... }
fn is_attached(self, alloc: &IDBoundAlloc<Self>) -> bool { ... }
fn obj_detach(
obj: &Self::ObjectT,
alloc: &IDBoundAlloc<Self>,
) -> EntityListRes<Self> { ... }
fn detach(self, alloc: &IDBoundAlloc<Self>) -> EntityListRes<Self> { ... }
}Expand description
An entity pointer list node that supports ring lists.
Required Methods§
Sourcefn obj_load_head(obj: &Self::ObjectT) -> EntityListNodeHead<Self>
fn obj_load_head(obj: &Self::ObjectT) -> EntityListNodeHead<Self>
Load the EntityListNodeHead from the entity object.
Sourcefn obj_store_head(obj: &Self::ObjectT, head: EntityListNodeHead<Self>)
fn obj_store_head(obj: &Self::ObjectT, head: EntityListNodeHead<Self>)
Store the EntityListNodeHead into the entity object.
NOTE: Entity Lists are internally mutable
Sourcefn obj_is_sentinel(obj: &Self::ObjectT) -> bool
fn obj_is_sentinel(obj: &Self::ObjectT) -> bool
Check if the entity object is a sentinel node.
Sourcefn new_sentinel_obj() -> Self::ObjectT
fn new_sentinel_obj() -> Self::ObjectT
Create a new sentinel entity object.
Sourcefn on_unplug(
self,
obj: &Self::ObjectT,
alloc: &IDBoundAlloc<Self>,
) -> EntityListRes<Self>
fn on_unplug( self, obj: &Self::ObjectT, alloc: &IDBoundAlloc<Self>, ) -> EntityListRes<Self>
Signal: invoked when this node is being unplugged from a list.
Provided Methods§
Sourcefn new_sentinel(alloc: &IDBoundAlloc<Self>) -> Self
fn new_sentinel(alloc: &IDBoundAlloc<Self>) -> Self
Create a new sentinel node ID allocated from the given allocator.
Sourcefn is_sentinel(self, alloc: &IDBoundAlloc<Self>) -> bool
fn is_sentinel(self, alloc: &IDBoundAlloc<Self>) -> bool
Check if this node ID is a sentinel.
Sourcefn get_prev_id(self, alloc: &IDBoundAlloc<Self>) -> Option<Self>
fn get_prev_id(self, alloc: &IDBoundAlloc<Self>) -> Option<Self>
Get the previous node ID, if any.
Sourcefn get_next_id(self, alloc: &IDBoundAlloc<Self>) -> Option<Self>
fn get_next_id(self, alloc: &IDBoundAlloc<Self>) -> Option<Self>
Get the next node ID, if any.
Sourcefn is_attached(self, alloc: &IDBoundAlloc<Self>) -> bool
fn is_attached(self, alloc: &IDBoundAlloc<Self>) -> bool
Check if this node is currently attached to a list.
Sourcefn obj_detach(
obj: &Self::ObjectT,
alloc: &IDBoundAlloc<Self>,
) -> EntityListRes<Self>
fn obj_detach( obj: &Self::ObjectT, alloc: &IDBoundAlloc<Self>, ) -> EntityListRes<Self>
Detach the given node from its current ring list.
Sourcefn detach(self, alloc: &IDBoundAlloc<Self>) -> EntityListRes<Self>
fn detach(self, alloc: &IDBoundAlloc<Self>) -> EntityListRes<Self>
Detach this node from the ring list it is currently attached to.
§Signal invocation
detach will invoke on_unplug on self before modifying any links.
If the signal returns an error, the operation is aborted without modifying any links.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.