pub(crate) struct GuardedLinkedList<L: Link> {
guard: NonNull<L::Target>,
}Expand description
An intrusive linked list, but instead of keeping pointers to the head
and tail nodes, it uses a special guard node linked with those nodes.
It means that the list is circular and every pointer of a node from
the list is not None, including pointers from the guard node.
If a list is empty, then both pointers of the guard node are pointing at the guard node itself.
Fields§
§guard: NonNull<L::Target>Pointer to the guard node.
Implementations§
Auto Trait Implementations§
impl<L> Freeze for GuardedLinkedList<L>
impl<L> RefUnwindSafe for GuardedLinkedList<L>
impl<L> !Send for GuardedLinkedList<L>
impl<L> !Sync for GuardedLinkedList<L>
impl<L> Unpin for GuardedLinkedList<L>
impl<L> UnsafeUnpin for GuardedLinkedList<L>
impl<L> UnwindSafe for GuardedLinkedList<L>
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