pub enum ArtNode {
Some(Box<[(u8, ArtNode)]>),
Many(Box<[ArtNode; 256]>),
Path(Box<[u8]>, Box<ArtNode>),
None,
}
Expand description
An ART node exists in the context of a sequence of bytes, and indicates the possible options based on the next byte in the sequence.
Variants§
Some(Box<[(u8, ArtNode)]>)
Some of the bytes continue to further nodes, but many do not.
Many(Box<[ArtNode; 256]>)
Many of the bytes continue to further nodes, although some may not.
If a node is None
, it didn’t actually go anywhere.
The representation exists to be more economical than the Some
variant.
This is especially true if the associated ArtNode
size is small, which
it is not in this case, but will be once we flatten it.
Path(Box<[u8]>, Box<ArtNode>)
Indicates that there are no branching points for the next few bytes, after which the next node is provided.
None
Nothing to see here.
Auto Trait Implementations§
impl Freeze for ArtNode
impl RefUnwindSafe for ArtNode
impl Send for ArtNode
impl Sync for ArtNode
impl Unpin for ArtNode
impl UnwindSafe for ArtNode
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