pub unsafe trait XorLinkedListOps: LinkOps {
    // Required methods
    unsafe fn next(
        &self,
        ptr: Self::LinkPtr,
        prev: Option<Self::LinkPtr>,
    ) -> Option<Self::LinkPtr>;
    unsafe fn prev(
        &self,
        ptr: Self::LinkPtr,
        next: Option<Self::LinkPtr>,
    ) -> Option<Self::LinkPtr>;
    unsafe fn set(
        &mut self,
        ptr: Self::LinkPtr,
        prev: Option<Self::LinkPtr>,
        next: Option<Self::LinkPtr>,
    );
    unsafe fn replace_next_or_prev(
        &mut self,
        ptr: Self::LinkPtr,
        old: Option<Self::LinkPtr>,
        new: Option<Self::LinkPtr>,
    );
}
Expand description

Link operations for XorLinkedList.

Required Methods§

source

unsafe fn next( &self, ptr: Self::LinkPtr, prev: Option<Self::LinkPtr>, ) -> Option<Self::LinkPtr>

Returns the “next” link pointer of ptr.

§Safety

prev must have been previously passed to the set method, or prev must be equal to the new argument previously passed to replace_next_or_prev.

An implementation of next must not panic.

source

unsafe fn prev( &self, ptr: Self::LinkPtr, next: Option<Self::LinkPtr>, ) -> Option<Self::LinkPtr>

Returns the “prev” link pointer of ptr.

§Safety

next must have been previously passed to the set method, or next must be equal to the new argument previously passed to replace_next_or_prev.

An implementation of prev must not panic.

source

unsafe fn set( &mut self, ptr: Self::LinkPtr, prev: Option<Self::LinkPtr>, next: Option<Self::LinkPtr>, )

Assigns the “prev” and “next” link pointers of ptr.

§Safety

An implementation of set must not panic.

source

unsafe fn replace_next_or_prev( &mut self, ptr: Self::LinkPtr, old: Option<Self::LinkPtr>, new: Option<Self::LinkPtr>, )

Replaces the “next” or “prev” link pointer of ptr.

§Safety

old must be equal to either the next or prev argument previously passed to the set method, or old must be equal to the new argument previously passed to replace_next_or_prev.

An implementation of replace_next_or_prev must not panic.

Implementors§

source§

impl XorLinkedListOps for intrusive_collections::linked_list::AtomicLinkOps

source§

impl XorLinkedListOps for intrusive_collections::linked_list::LinkOps

source§

impl XorLinkedListOps for intrusive_collections::rbtree::AtomicLinkOps

source§

impl XorLinkedListOps for intrusive_collections::rbtree::LinkOps

source§

impl XorLinkedListOps for intrusive_collections::singly_linked_list::AtomicLinkOps

source§

impl XorLinkedListOps for intrusive_collections::singly_linked_list::LinkOps

source§

impl XorLinkedListOps for intrusive_collections::xor_linked_list::AtomicLinkOps

source§

impl XorLinkedListOps for intrusive_collections::xor_linked_list::LinkOps