pub struct Bimap<U: Clone + Ord, V: Clone + Ord> { /* private fields */ }Implementations§
Source§impl<U: Clone + Ord, V: Clone + Ord> Bimap<U, V>
impl<U: Clone + Ord, V: Clone + Ord> Bimap<U, V>
pub fn new() -> Self
pub fn insert(&mut self, u: U, v: V)
pub fn get(&self, u: &U) -> Option<&V>
pub fn get_rev(&self, v: &V) -> Option<&U>
pub fn get_mut(&mut self, u: &U) -> Option<&mut V>
pub fn get_rev_mut(&mut self, v: &V) -> Option<&mut U>
pub fn contains(&self, u: &U) -> bool
pub fn contains_rev(&self, v: &V) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn remove(&mut self, u: &U) -> Option<V>
pub fn remove_rev(&mut self, v: &V) -> Option<U>
pub fn clear(&mut self)
pub fn retain(&mut self, f: impl FnMut(&U, &V) -> bool)
pub fn iter(&self) -> impl Iterator<Item = (&U, &V)>
Trait Implementations§
Auto Trait Implementations§
impl<U, V> Freeze for Bimap<U, V>
impl<U, V> RefUnwindSafe for Bimap<U, V>where
U: RefUnwindSafe,
V: RefUnwindSafe,
impl<U, V> Send for Bimap<U, V>
impl<U, V> Sync for Bimap<U, V>
impl<U, V> Unpin for Bimap<U, V>
impl<U, V> UnwindSafe for Bimap<U, V>where
U: RefUnwindSafe,
V: RefUnwindSafe,
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