[][src]Trait intrusive_collections::xor_linked_list::XorLinkedListOps

pub unsafe trait XorLinkedListOps: LinkOps {
    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>
    ); }

Link operations for XorLinkedList.

Required methods

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.

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.

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.

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.

Loading content...

Implementors

impl XorLinkedListOps for intrusive_collections::linked_list::LinkOps[src]

impl XorLinkedListOps for intrusive_collections::rbtree::LinkOps[src]

impl XorLinkedListOps for intrusive_collections::singly_linked_list::LinkOps[src]

impl XorLinkedListOps for intrusive_collections::xor_linked_list::LinkOps[src]

Loading content...