pub struct AtomicLinkedList<T> {
head_ptr: Option<NonNullSendPtr<ListNode<T>>>,
}Fields§
§head_ptr: Option<NonNullSendPtr<ListNode<T>>>This field could be an AtomicPtr<ListNode<T>>, but in all our use cases,
the head is modified without contention, so we make it typed non-atomic.
Implementations§
source§impl<T> AtomicLinkedList<T>
impl<T> AtomicLinkedList<T>
pub fn from_elems(elems: impl Iterator<Item = T>) -> Self
pub fn head_node_ptr(&self) -> Option<NonNullSendPtr<ListNode<T>>>
pub fn set_head_node_ptr_noncontested( &mut self, new_head_ptr: Option<NonNullSendPtr<ListNode<T>>> )
pub fn push_head_node_noncontested( &mut self, new_head_own: Box<ListNode<T>> ) -> NonNullSendPtr<ListNode<T>>
pub fn snap(&self) -> ListSnapshot<T>
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for AtomicLinkedList<T>where
T: RefUnwindSafe,
impl<T> Send for AtomicLinkedList<T>
impl<T> Sync for AtomicLinkedList<T>
impl<T> Unpin for AtomicLinkedList<T>
impl<T> UnwindSafe for AtomicLinkedList<T>where
T: 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