pub enum ArtNode<V> {
Leaf {
key: Vec<u8>,
value: V,
},
Node4 {
prefix: Vec<u8>,
children: [Option<Box<ArtNode<V>>>; 4],
keys: [u8; 4],
num_children: u8,
},
Node16 {
prefix: Vec<u8>,
children: [Option<Box<ArtNode<V>>>; 16],
keys: [u8; 16],
num_children: u8,
},
Node48 {
prefix: Vec<u8>,
children: [Option<Box<ArtNode<V>>>; 48],
index: [u8; 256],
num_children: u8,
},
Node256 {
prefix: Vec<u8>,
children: [Option<Box<ArtNode<V>>>; 256],
num_children: u16,
},
}Expand description
ART node types with adaptive sizing
Variants§
Leaf
Leaf node containing value
Node4
Node with 4 children (smallest)
Node16
Node with 16 children
Node48
Node with 48 children (using index array)
Node256
Node with 256 children (full array)
Implementations§
Auto Trait Implementations§
impl<V> Freeze for ArtNode<V>where
V: Freeze,
impl<V> RefUnwindSafe for ArtNode<V>where
V: RefUnwindSafe,
impl<V> Send for ArtNode<V>where
V: Send,
impl<V> Sync for ArtNode<V>where
V: Sync,
impl<V> Unpin for ArtNode<V>where
V: Unpin,
impl<V> UnwindSafe for ArtNode<V>where
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request