Struct keylist::vec_keylist::VecKeylist
source · [−]Tuple Fields
0: Vec<(K, V)>
Implementations
sourceimpl<K, V> VecKeylist<K, V>
impl<K, V> VecKeylist<K, V>
pub fn new() -> Self
pub fn into_swapped(self) -> VecKeylist<V, K>
pub fn insert(&mut self, index: usize, k: K, v: V)
pub fn push(&mut self, k: K, v: V)
pub fn pop(&mut self) -> Option<(K, V)>
pub fn remove(&mut self, index: usize) -> (K, V)
pub fn iter<'a>(&'a self) -> impl Iterator<Item = &'a (K, V)>
pub fn iter_mut<'a>(&'a mut self) -> impl Iterator<Item = &'a mut (K, V)>
pub fn keys<'a>(&'a self) -> impl Iterator<Item = &'a K>
pub fn keys_mut<'a>(&'a mut self) -> impl Iterator<Item = &'a mut K>
pub fn values<'a>(&'a self) -> impl Iterator<Item = &'a V>
pub fn values_mut<'a>(&'a mut self) -> impl Iterator<Item = &'a mut V>
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
sourceimpl<K: PartialEq, V> VecKeylist<K, V>
impl<K: PartialEq, V> VecKeylist<K, V>
pub fn get_key_value(&self, key: &K) -> Option<&(K, V)>
pub fn get_key_value_mut(&mut self, key: &K) -> Option<&mut (K, V)>
pub fn get(&self, key: &K) -> Option<&V>
pub fn get_mut(&mut self, key: &K) -> Option<&mut V>
pub fn get_all_get_key_value(&self, key: &K) -> Vec<&(K, V)>
sourceimpl<K: Ord, V> VecKeylist<K, V>
impl<K: Ord, V> VecKeylist<K, V>
pub fn sort_by_key<'a>(&'a mut self)
sourceimpl<K, V: Ord> VecKeylist<K, V>
impl<K, V: Ord> VecKeylist<K, V>
pub fn sort_by_value<'a>(&'a mut self)
sourceimpl<K: PartialEq, V: PartialEq> VecKeylist<K, V>
impl<K: PartialEq, V: PartialEq> VecKeylist<K, V>
sourceimpl<K: Ord, V: Ord> VecKeylist<K, V>
impl<K: Ord, V: Ord> VecKeylist<K, V>
pub fn sort(&mut self)
sourcepub fn get_key_value_sorted(&self, key: &K) -> Option<&(K, V)>
pub fn get_key_value_sorted(&self, key: &K) -> Option<&(K, V)>
The normal get function uses a find on a iterator to find the key value. This function uses binary search to find the key value
sourcepub fn get_sorted(&self, key: &K) -> Option<&V>
pub fn get_sorted(&self, key: &K) -> Option<&V>
The normal get function uses a find on a iterator to find the value. This function uses binary search to find the value
Trait Implementations
sourceimpl<K: Clone, V: Clone> Clone for VecKeylist<K, V>
impl<K: Clone, V: Clone> Clone for VecKeylist<K, V>
sourceimpl<K: Debug, V: Debug> Debug for VecKeylist<K, V>
impl<K: Debug, V: Debug> Debug for VecKeylist<K, V>
sourceimpl<'a, K: Copy, V: Copy> Extend<(&'a K, &'a V)> for VecKeylist<K, V>
impl<'a, K: Copy, V: Copy> Extend<(&'a K, &'a V)> for VecKeylist<K, V>
sourcefn extend<T: IntoIterator<Item = (&'a K, &'a V)>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = (&'a K, &'a V)>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl<K, V> Extend<(K, V)> for VecKeylist<K, V>
impl<K, V> Extend<(K, V)> for VecKeylist<K, V>
sourcefn extend<T: IntoIterator<Item = (K, V)>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = (K, V)>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl<K, V> FromIterator<(K, V)> for VecKeylist<K, V>
impl<K, V> FromIterator<(K, V)> for VecKeylist<K, V>
sourcefn from_iter<T: IntoIterator<Item = (K, V)>>(iter: T) -> VecKeylist<K, V>
fn from_iter<T: IntoIterator<Item = (K, V)>>(iter: T) -> VecKeylist<K, V>
Creates a value from an iterator. Read more
sourceimpl<K: Hash, V: Hash> Hash for VecKeylist<K, V>
impl<K: Hash, V: Hash> Hash for VecKeylist<K, V>
sourceimpl<K, V> IntoIterator for VecKeylist<K, V>
impl<K, V> IntoIterator for VecKeylist<K, V>
sourceimpl<K: PartialEq, V: PartialEq> PartialEq<VecKeylist<K, V>> for VecKeylist<K, V>
impl<K: PartialEq, V: PartialEq> PartialEq<VecKeylist<K, V>> for VecKeylist<K, V>
sourcefn eq(&self, other: &VecKeylist<K, V>) -> bool
fn eq(&self, other: &VecKeylist<K, V>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &VecKeylist<K, V>) -> bool
fn ne(&self, other: &VecKeylist<K, V>) -> bool
This method tests for !=
.
impl<K, V> StructuralPartialEq for VecKeylist<K, V>
Auto Trait Implementations
impl<K, V> RefUnwindSafe for VecKeylist<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for VecKeylist<K, V> where
K: Send,
V: Send,
impl<K, V> Sync for VecKeylist<K, V> where
K: Sync,
V: Sync,
impl<K, V> Unpin for VecKeylist<K, V> where
K: Unpin,
V: Unpin,
impl<K, V> UnwindSafe for VecKeylist<K, V> where
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more