Trait Insert

Source
pub(crate) trait Insert<K: Key, V: Copy> {
    // Required method
    fn insert(&mut self, key: K, value: V) -> Result<(), ()>;
}
Expand description

Trait for writing new key/value pairs to a bucket array

Required Methods§

Source

fn insert(&mut self, key: K, value: V) -> Result<(), ()>

Append a new item to its sorting bucket, or return Err(()) if it’s full

Implementors§

Source§

impl<'k, 'v, const N: usize, const CAP: usize, C: Count, K: Key, KS: KeyStorage<K>, V: Copy> Insert<K, V> for KeyValueBucketArray<'k, 'v, N, CAP, C, K, KS, V>

Source§

impl<'v, const N: usize, const CAP: usize, C: Count, K: Key, V: Copy> Insert<K, V> for ValueBucketArray<'v, N, CAP, C, K, V>