Struct linked_tail_list::TailValRef
[−]
[src]
pub struct TailValRef<'node, 'tail, T: 'node + 'tail> { /* fields omitted */ }
A TailValRef
is an active item, which provides mutable access to a single
node and its successors.
Methods
impl<'node, 'tail, T: 'node + 'tail> TailValRef<'node, 'tail, T>
[src]
fn tail<'slf>(&'slf mut self) -> (&'slf ValRef<'node, T>, Cursor<'slf, T>)
Returns a reference to a ValRef
to the first node owned by self
, as
well as a Cursor
owning the rest of the nodes owned by self
.
After both items have gone out of scope, this method may be called again.
fn into_tail(self) -> (ValRef<'node, T>, Cursor<'tail, T>)
Returns a ValRef
to the first node owned by self, as well as a
Cursorowning the rest of the nodes owned by
self`.
This method consumes self
. The Cursor
who returned this may be used
again after the returned cursor has gone out of scope.
fn into_passive(self) -> ValRef<'node, T>
Turns self
into a ValRef
to the first node owned by self
. The
Cursor
who returned this may be used again after this method has been
called.
fn insert_before(&mut self, val: T) -> ValRef<'node, T>
Inserts a new element before this element and returns a ValRef
to the
newly inserted element.
fn insert_after(&mut self, val: T) -> ValRef<'node, T>
Inserts a new element after this element and returns a ValRef
to the
newly inserted element.
fn remove(self) -> T
Removes this element from the list and returns it's value.
Trait Implementations
impl<'node, 'tail, T: 'node + 'tail> Deref for TailValRef<'node, 'tail, T>
[src]
type Target = T
The resulting type after dereferencing
fn deref(&self) -> &T
The method called to dereference a value
impl<'node, 'tail, T: 'node + 'tail> DerefMut for TailValRef<'node, 'tail, T>
[src]
fn deref_mut(&mut self) -> &mut T
The method called to mutably dereference a value