pub struct TailValRef<'node, 'tail, T: 'node + 'tail> { /* private fields */ }
Expand description
A TailValRef
is an active item, which provides mutable access to a single
node and its successors.
Implementations§
Source§impl<'node, 'tail, T: 'node + 'tail> TailValRef<'node, 'tail, T>
impl<'node, 'tail, T: 'node + 'tail> TailValRef<'node, 'tail, T>
Sourcepub fn tail<'slf>(&'slf mut self) -> (&'slf ValRef<'node, T>, Cursor<'slf, T>)
pub 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.
Sourcepub fn into_tail(self) -> (ValRef<'node, T>, Cursor<'tail, T>)
pub 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.
Sourcepub fn into_passive(self) -> ValRef<'node, T>
pub 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.
Sourcepub fn insert_before(&mut self, val: T) -> ValRef<'node, T>
pub 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.
Sourcepub fn insert_after(&mut self, val: T) -> ValRef<'node, T>
pub 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.