Struct orzir_core::list::List
source · pub struct List<K, N>{ /* private fields */ }Implementations§
source§impl<K, N> List<K, N>
impl<K, N> List<K, N>
pub fn is_empty(&self) -> bool
pub fn front(&self) -> Option<K>
pub fn back(&self) -> Option<K>
pub fn node(&self, key: K) -> Option<&N>
pub fn node_mut(&mut self, key: K) -> Option<&mut N>
pub fn contains(&self, key: K) -> bool
pub fn insert_after(&mut self, key: K, after: K) -> Result<(), ListError<K>>
pub fn insert_before(&mut self, key: K, before: K) -> Result<(), ListError<K>>
pub fn remove(&mut self, key: K) -> Result<(), ListError<K>>
pub fn append(&mut self, key: K) -> Result<(), ListError<K>>
pub fn prepend(&mut self, key: K) -> Result<(), ListError<K>>
pub fn iter(&self) -> impl Iterator<Item = K> + '_
Trait Implementations§
source§impl<K, N> Extend<K> for List<K, N>
impl<K, N> Extend<K> for List<K, N>
source§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = K>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = K>,
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl<'a, K, N> IntoIterator for &'a List<K, N>
impl<'a, K, N> IntoIterator for &'a List<K, N>
Auto Trait Implementations§
impl<K, N> Freeze for List<K, N>where
K: Freeze,
impl<K, N> RefUnwindSafe for List<K, N>where
K: RefUnwindSafe,
N: RefUnwindSafe,
impl<K, N> Send for List<K, N>
impl<K, N> Sync for List<K, N>
impl<K, N> Unpin for List<K, N>
impl<K, N> UnwindSafe for List<K, N>where
K: UnwindSafe,
N: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.