[−][src]Struct rc_dlist_deque::dlist::List
The general list type.
Use List1
if each node only needs to be on one list a time.
struct List<N, S> where S : Selector<Node=N>
Methods
impl<N, S: Selector<Node = N>> List<N, S>
[src]
pub fn new() -> Self
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn first_last(&self, tail: bool) -> Cursor<N, S>
[src]
Get Some
pointer to the first or last element, or None
if the list is empty.
pub fn first(&self) -> Cursor<N, S>
[src]
pub fn last(&self) -> Cursor<N, S>
[src]
ⓘImportant traits for ListIterator<N, S>pub fn iter(&self) -> ListIterator<N, S>
[src]
ⓘImportant traits for ListIterator<N, S>
pub fn insert(
&mut self,
new_entry: &Pointer<N, S>,
location: &Pointer<N, S>,
after: bool
)
[src]
&mut self,
new_entry: &Pointer<N, S>,
location: &Pointer<N, S>,
after: bool
)
Inserts new_entry
into self
before or after locaation
.
Panics, or tangles the list(s):
new_entry
must not be on any list.
location
must be on self
(and not on some other list).
pub fn push_at(&mut self, new_entry: &Pointer<N, S>, tail: bool)
[src]
Inserts new_entry
at the start or end of the list.
Panics, or tangles the list(s):
new_entry
must not be on any list.
pub fn push_front(&mut self, n: &Pointer<N, S>)
[src]
pub fn push_back(&mut self, n: &Pointer<N, S>)
[src]
pub fn pop_at(&mut self, tail: bool) -> Cursor<N, S>
[src]
Removes the entry at the start or end of the list,
returning None
if the list is empty.
pub fn pop_front(&mut self) -> Cursor<N, S>
[src]
pub fn pop_back(&mut self) -> Cursor<N, S>
[src]
pub fn remove(&mut self, item: &Pointer<N, S>)
[src]
pub fn clear(&mut self)
[src]
Trait Implementations
impl<N, S: Selector<Node = N>> Default for List<N, S>
[src]
impl<N, S: Selector<Node = N>> Drop for List<N, S>
[src]
impl<'l, N, S: Selector<Node = N>> IntoIterator for &'l List<N, S>
[src]
type Item = Pointer<N, S>
The type of the elements being iterated over.
type IntoIter = ListIterator<N, S>
Which kind of iterator are we turning this into?
ⓘImportant traits for ListIterator<N, S>fn into_iter(self) -> ListIterator<N, S>
[src]
ⓘImportant traits for ListIterator<N, S>
Auto Trait Implementations
impl<N, S> !RefUnwindSafe for List<N, S>
impl<N, S> !Send for List<N, S>
impl<N, S> !Sync for List<N, S>
impl<N, S> Unpin for List<N, S> where
S: Unpin,
S: Unpin,
impl<N, S> UnwindSafe for List<N, S> where
N: RefUnwindSafe,
S: UnwindSafe,
N: RefUnwindSafe,
S: UnwindSafe,
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, 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>,