pub struct AVLTree {
pub root: Option<NodeId>,
pub height: usize,
pub key_length: usize,
pub value_length: Option<usize>,
pub resolver: Resolver,
}Fields§
§root: Option<NodeId>§height: usize§key_length: usize§value_length: Option<usize>§resolver: ResolverImplementations§
Source§impl AVLTree
impl AVLTree
pub fn new( resolver: Resolver, key_length: usize, value_length: Option<usize>, ) -> AVLTree
pub fn left(&self, node: &NodeId) -> NodeId
pub fn right(&self, node: &NodeId) -> NodeId
pub fn balance(&self, node: &NodeId) -> Balance
pub fn label(&self, node: &NodeId) -> Digest32
pub fn key(&self, node: &NodeId) -> ADKey
pub fn value(&self, node: &NodeId) -> ADValue
pub fn next_node_key(&self, node: &NodeId) -> ADKey
pub fn visited(&self, node: &NodeId) -> bool
pub fn is_new(&self, node: &NodeId) -> bool
pub fn mark_visited(&self, node: &NodeId, visited: bool)
pub fn resolve(&self, child: &mut NodeId) -> NodeId
pub fn copy(&self, node: &NodeId) -> Node
pub fn extract_nodes( &self, extractor: &mut dyn FnMut(&mut Node) -> bool, ) -> Option<Vec<NodeId>>
pub fn extract_first_node( &self, extractor: &mut dyn FnMut(&mut Node) -> bool, ) -> Option<NodeId>
pub fn contains(&self, node: &NodeId) -> bool
pub fn contains_key(&self, key: &ADKey, label: &Digest32) -> bool
pub fn reset(&self)
pub fn pack(&self, node: NodeId) -> Bytes
pub fn unpack(&self, bytes: &Bytes) -> NodeId
pub fn positive_infinity_key(&self) -> ADKey
pub fn negative_infinity_key(&self) -> ADKey
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AVLTree
impl !RefUnwindSafe for AVLTree
impl !Send for AVLTree
impl !Sync for AVLTree
impl Unpin for AVLTree
impl !UnwindSafe for AVLTree
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