Struct tokio::util::linked_list::GuardedLinkedList
source · pub(crate) struct GuardedLinkedList<L, T> {
guard: NonNull<T>,
_marker: PhantomData<*const L>,
}
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<T>
Pointer to the guard node.
_marker: PhantomData<*const L>
Node type marker.
Implementations§
Auto Trait Implementations§
impl<L, T> Freeze for GuardedLinkedList<L, T>
impl<L, T> RefUnwindSafe for GuardedLinkedList<L, T>where
T: RefUnwindSafe,
L: RefUnwindSafe,
impl<L, T> !Send for GuardedLinkedList<L, T>
impl<L, T> !Sync for GuardedLinkedList<L, T>
impl<L, T> Unpin for GuardedLinkedList<L, T>
impl<L, T> UnwindSafe for GuardedLinkedList<L, T>where
T: RefUnwindSafe,
L: 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