pub struct Collision<K, V>(Box<[(K, V)]>);
Tuple Fields§
§0: Box<[(K, V)]>
Implementations§
source§impl<K: Clone + PartialEq, V: Clone> Collision<K, V>
impl<K: Clone + PartialEq, V: Clone> Collision<K, V>
pub fn insert(&self, k: K, v: V) -> Result<Self, InsertError>
fn get_record_and_pos<Q>(&self, k: &Q) -> Option<(usize, &(K, V))>where K: Borrow<Q>, Q: PartialEq,
pub fn remove<Q>(&self, h: HashedKey, k: &Q) -> Result<Entry<K, V>, RemoveError>where K: Borrow<Q>, Q: PartialEq,
pub fn remove_match<Q>( &self, h: HashedKey, k: &Q, v: &V ) -> Result<Entry<K, V>, RemoveError>where K: Borrow<Q>, Q: PartialEq, V: PartialEq,
pub fn update<F, U>( &self, h: HashedKey, k: &K, f: F ) -> Result<Entry<K, V>, UpdateError<U>>where F: FnOnce(&V) -> Result<Option<V>, U>, U: Error + Debug + 'static,
pub fn replace(&self, k: &K, v: V) -> Result<(Self, V), ReplaceError>
pub fn replace_with<F>(&self, k: &K, f: F) -> Result<Self, ReplaceError>where F: FnOnce(&V) -> V,
Trait Implementations§
Auto Trait Implementations§
impl<K, V> RefUnwindSafe for Collision<K, V>where K: RefUnwindSafe, V: RefUnwindSafe,
impl<K, V> Send for Collision<K, V>where K: Send, V: Send,
impl<K, V> Sync for Collision<K, V>where K: Sync, V: Sync,
impl<K, V> Unpin for Collision<K, V>
impl<K, V> UnwindSafe for Collision<K, V>where K: UnwindSafe, V: 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