[−][src]Struct intrusive_collections::linked_list::Cursor
A cursor which provides read-only access to a LinkedList
.
Implementations
impl<'a, A: Adapter> Cursor<'a, A> where
A::LinkOps: LinkedListOps,
[src]
A::LinkOps: LinkedListOps,
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::PointerOps as PointerOps>::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::PointerOps as PointerOps>::Pointer> where
<A::PointerOps as PointerOps>::Pointer: Clone,
[src]
<A::PointerOps as PointerOps>::Pointer: Clone,
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 LinkedList
.
If the cursor is pointer to the null object then this will move it to
the first element of the LinkedList
. If it is pointing to the
last element of the LinkedList
then this will move it to the
null object.
pub fn move_prev(&mut self)
[src]
Moves the cursor to the previous element of the LinkedList
.
If the cursor is pointer to the null object then this will move it to
the last element of the LinkedList
. If it is pointing to the first
element of the LinkedList
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 LinkedList
.
If the cursor is pointer to the null object then this will return the
first element of the LinkedList
. If it is pointing to the last
element of the LinkedList
then this will return a null cursor.
pub fn peek_prev(&self) -> Cursor<A>
[src]
Returns a cursor pointing to the previous element of the LinkedList
.
If the cursor is pointer to the null object then this will return the
last element of the LinkedList
. If it is pointing to the first
element of the LinkedList
then this will return a null cursor.
Trait Implementations
impl<'a, A: Adapter> Clone for Cursor<'a, A> where
A::LinkOps: LinkedListOps,
[src]
A::LinkOps: LinkedListOps,
fn clone(&self) -> Cursor<'a, A>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl<'a, A> Send for Cursor<'a, A> where
A: Sync,
<<A as Adapter>::LinkOps as LinkOps>::LinkPtr: Send,
<<A as Adapter>::PointerOps as PointerOps>::Value: Sync,
A: Sync,
<<A as Adapter>::LinkOps as LinkOps>::LinkPtr: Send,
<<A as Adapter>::PointerOps as PointerOps>::Value: Sync,
impl<'a, A> Sync for Cursor<'a, A> where
A: Sync,
<<A as Adapter>::LinkOps as LinkOps>::LinkPtr: Sync,
<<A as Adapter>::PointerOps as PointerOps>::Value: Sync,
A: Sync,
<<A as Adapter>::LinkOps as LinkOps>::LinkPtr: Sync,
<<A as Adapter>::PointerOps as PointerOps>::Value: Sync,
impl<'a, A> Unpin for Cursor<'a, A> where
<<A as Adapter>::LinkOps as LinkOps>::LinkPtr: Unpin,
<<A as Adapter>::LinkOps as LinkOps>::LinkPtr: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,