#[repr(C)]pub struct Node256 {
pub header: NodeHeader,
pub children: [Atomic<ArtNode>; 256],
}Expand description
Node256: Full node with 256 children Direct indexing by byte value
Fields§
§header: NodeHeader§children: [Atomic<ArtNode>; 256]Direct child pointers indexed by byte value
Implementations§
Source§impl Node256
impl Node256
pub fn new() -> Self
pub fn with_prefix(prefix: &[u8]) -> Self
Sourcepub fn find_child<'g>(
&self,
key: u8,
guard: &'g Guard,
) -> Option<Shared<'g, ArtNode>>
pub fn find_child<'g>( &self, key: u8, guard: &'g Guard, ) -> Option<Shared<'g, ArtNode>>
O(1) direct child lookup
Sourcepub fn add_child(&self, key: u8, child: Owned<ArtNode>, guard: &Guard) -> bool
pub fn add_child(&self, key: u8, child: Owned<ArtNode>, guard: &Guard) -> bool
Add a child (always succeeds for Node256)
pub fn is_full(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Node256
impl RefUnwindSafe for Node256
impl Send for Node256
impl Sync for Node256
impl Unpin for Node256
impl UnwindSafe for Node256
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 more