pub struct Art<ValueType, const KEY_LENGTH: usize> { /* private fields */ }
Expand description
An Adaptive Radix Trie (ART) for fixed-length keys.
Implementations§
Source§impl<V, const K: usize> Art<V, K>
impl<V, const K: usize> Art<V, K>
pub const fn new() -> Art<V, K>
pub const fn len(&self) -> usize
pub const fn is_empty(&self) -> bool
pub fn insert(&mut self, key: [u8; K], value: V) -> Option<V>
pub fn remove(&mut self, key: &[u8; K]) -> Option<V>
pub fn get(&self, key: &[u8; K]) -> Option<&V>
pub fn iter(&self) -> Iter<'_, V, K> ⓘ
pub fn range<'a, R>(&'a self, range: R) -> Iter<'a, V, K> ⓘ
Trait Implementations§
Source§impl<'a, V, const K: usize> IntoIterator for &'a Art<V, K>
impl<'a, V, const K: usize> IntoIterator for &'a Art<V, K>
impl<V: Eq, const K: usize> Eq for Art<V, K>
Auto Trait Implementations§
impl<ValueType, const KEY_LENGTH: usize> Freeze for Art<ValueType, KEY_LENGTH>
impl<ValueType, const KEY_LENGTH: usize> RefUnwindSafe for Art<ValueType, KEY_LENGTH>where
ValueType: RefUnwindSafe,
impl<ValueType, const KEY_LENGTH: usize> Send for Art<ValueType, KEY_LENGTH>where
ValueType: Send,
impl<ValueType, const KEY_LENGTH: usize> Sync for Art<ValueType, KEY_LENGTH>where
ValueType: Sync,
impl<ValueType, const KEY_LENGTH: usize> Unpin for Art<ValueType, KEY_LENGTH>where
ValueType: Unpin,
impl<ValueType, const KEY_LENGTH: usize> UnwindSafe for Art<ValueType, KEY_LENGTH>where
ValueType: 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