pub struct Table<TKey: Key, TValue> { /* private fields */ }Expand description
Key-Value store.
Implementations§
Source§impl<TKey: Key, TValue> Table<TKey, TValue>
impl<TKey: Key, TValue> Table<TKey, TValue>
Sourcepub fn new(
my_key: TKey,
max_bucket_size: usize,
max_bits: usize,
) -> Table<TKey, TValue>
pub fn new( my_key: TKey, max_bucket_size: usize, max_bits: usize, ) -> Table<TKey, TValue>
Creates a new Table instance.
Sourcepub fn update(&mut self, key: TKey, value: TValue) -> Option<(TKey, TValue)>
pub fn update(&mut self, key: TKey, value: TValue) -> Option<(TKey, TValue)>
Inserts a new item in the table.
See Bucket::update() for details about the return value.
Auto Trait Implementations§
impl<TKey, TValue> Freeze for Table<TKey, TValue>where
TKey: Freeze,
impl<TKey, TValue> RefUnwindSafe for Table<TKey, TValue>where
TKey: RefUnwindSafe,
TValue: RefUnwindSafe,
impl<TKey, TValue> Send for Table<TKey, TValue>
impl<TKey, TValue> Sync for Table<TKey, TValue>
impl<TKey, TValue> Unpin for Table<TKey, TValue>
impl<TKey, TValue> UnwindSafe for Table<TKey, TValue>where
TKey: UnwindSafe,
TValue: 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