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

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>
    ); }
Expand description

Link operations for XorLinkedList.

Required methods

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.

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.

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

Safety

An implementation of set must not panic.

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