[][src]Struct intrusive_collections::singly_linked_list::Cursor

pub struct Cursor<'a, A: Adapter<Link = Link>> { /* fields omitted */ }

A cursor which provides read-only access to a SinglyLinkedList.

Methods

impl<'a, A: Adapter<Link = Link>> Cursor<'a, A>[src]

pub fn is_null(&self) -> bool[src]

Checks if the cursor is currently pointing to the null object.

pub fn get(&self) -> Option<&'a A::Value>[src]

Returns a reference to the object that the cursor is currently pointing to.

This returns None if the cursor is currently pointing to the null object.

pub fn clone_pointer(&self) -> Option<A::Pointer> where
    A::Pointer: Clone
[src]

Clones and returns the pointer that points to the element that the cursor is referencing.

This returns None if the cursor is currently pointing to the null object.

pub fn move_next(&mut self)[src]

Moves the cursor to the next element of the SinglyLinkedList.

If the cursor is pointer to the null object then this will move it to the first element of the SinglyLinkedList. If it is pointing to the last element of the SinglyLinkedList then this will move it to the null object.

pub fn peek_next(&self) -> Cursor<A>[src]

Returns a cursor pointing to the next element of the SinglyLinkedList.

If the cursor is pointer to the null object then this will return the first element of the SinglyLinkedList. If it is pointing to the last element of the SinglyLinkedList then this will return a null cursor.

Trait Implementations

impl<'a, A: Adapter<Link = Link> + 'a> Clone for Cursor<'a, A>[src]

Auto Trait Implementations

impl<'a, A> Unpin for Cursor<'a, A>

impl<'a, A> !Send for Cursor<'a, A>

impl<'a, A> !Sync for Cursor<'a, A>

impl<'a, A> !UnwindSafe for Cursor<'a, A>

impl<'a, A> !RefUnwindSafe for Cursor<'a, A>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.