#[repr(C)]pub struct RedBlackTree<K: PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> {
pub root: u32,
/* private fields */
}Fields§
§root: u32Implementations§
Source§impl<K: Debug + PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> RedBlackTree<K, V, MAX_SIZE>
impl<K: Debug + PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> RedBlackTree<K, V, MAX_SIZE>
pub fn pretty_print(&self)
pub fn is_valid_red_black_tree(&self) -> bool
pub fn new() -> Self
pub fn initialize(&mut self)
pub fn get_node(&self, node: u32) -> &RBNode<K, V>
pub fn get_node_mut(&mut self, node: u32) -> &mut RBNode<K, V>
pub fn is_red(&self, node: u32) -> bool
pub fn is_black(&self, node: u32) -> bool
pub fn get_child(&self, node: u32, dir: u32) -> u32
pub fn is_leaf(&self, node: u32) -> bool
pub fn is_root(&self, node: u32) -> bool
pub fn get_dir(&self, node: u32, dir: u32) -> u32
pub fn get_left(&self, node: u32) -> u32
pub fn get_right(&self, node: u32) -> u32
pub fn get_color(&self, node: u32) -> u32
pub fn get_parent(&self, node: u32) -> u32
pub fn remove_root(&mut self) -> Option<RBNode<K, V>>
pub fn get_addr(&self, key: &K) -> u32
Trait Implementations§
Source§impl<K: Clone + PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Clone + Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> Clone for RedBlackTree<K, V, MAX_SIZE>
impl<K: Clone + PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Clone + Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> Clone for RedBlackTree<K, V, MAX_SIZE>
Source§fn clone(&self) -> RedBlackTree<K, V, MAX_SIZE>
fn clone(&self) -> RedBlackTree<K, V, MAX_SIZE>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<K: Debug + PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> Default for RedBlackTree<K, V, MAX_SIZE>
impl<K: Debug + PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> Default for RedBlackTree<K, V, MAX_SIZE>
Source§impl<K: Debug + PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> FromSlice for RedBlackTree<K, V, MAX_SIZE>
impl<K: Debug + PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> FromSlice for RedBlackTree<K, V, MAX_SIZE>
fn new_from_slice(slice: &mut [u8]) -> &mut Self
Source§impl<K: Debug + PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> Index<&K> for RedBlackTree<K, V, MAX_SIZE>
impl<K: Debug + PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> Index<&K> for RedBlackTree<K, V, MAX_SIZE>
Source§impl<K: Debug + PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> IndexMut<&K> for RedBlackTree<K, V, MAX_SIZE>
impl<K: Debug + PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> IndexMut<&K> for RedBlackTree<K, V, MAX_SIZE>
Source§impl<'a, K: Debug + PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> IntoIterator for &'a RedBlackTree<K, V, MAX_SIZE>
impl<'a, K: Debug + PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> IntoIterator for &'a RedBlackTree<K, V, MAX_SIZE>
Source§impl<'a, K: Debug + PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> IntoIterator for &'a mut RedBlackTree<K, V, MAX_SIZE>
impl<'a, K: Debug + PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> IntoIterator for &'a mut RedBlackTree<K, V, MAX_SIZE>
Source§impl<K: Debug + PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> NodeAllocatorMap<K, V> for RedBlackTree<K, V, MAX_SIZE>
impl<K: Debug + PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> NodeAllocatorMap<K, V> for RedBlackTree<K, V, MAX_SIZE>
fn insert(&mut self, key: K, value: V) -> Option<u32>
fn remove(&mut self, key: &K) -> Option<V>
fn contains(&self, key: &K) -> bool
fn get(&self, key: &K) -> Option<&V>
fn get_mut(&mut self, key: &K) -> Option<&mut V>
fn len(&self) -> usize
fn capacity(&self) -> usize
fn iter(&self) -> Box<dyn DoubleEndedIterator<Item = (&K, &V)> + '_>
fn iter_mut(&mut self) -> Box<dyn DoubleEndedIterator<Item = (&K, &mut V)> + '_>
fn is_empty(&self) -> bool
Source§impl<K: Debug + PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> OrderedNodeAllocatorMap<K, V> for RedBlackTree<K, V, MAX_SIZE>
impl<K: Debug + PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> OrderedNodeAllocatorMap<K, V> for RedBlackTree<K, V, MAX_SIZE>
Source§impl<K: PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> ZeroCopy for RedBlackTree<K, V, MAX_SIZE>
impl<K: PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> ZeroCopy for RedBlackTree<K, V, MAX_SIZE>
fn load_mut_bytes(data: &mut [u8]) -> Option<&mut Self>
fn load_bytes(data: &[u8]) -> Option<&Self>
Source§impl<K: PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> Zeroable for RedBlackTree<K, V, MAX_SIZE>
impl<K: PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> Zeroable for RedBlackTree<K, V, MAX_SIZE>
impl<K: Copy + PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Copy + Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> Copy for RedBlackTree<K, V, MAX_SIZE>
impl<K: PartialOrd + Ord + Copy + Clone + Default + Pod + Zeroable, V: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> Pod for RedBlackTree<K, V, MAX_SIZE>
Auto Trait Implementations§
impl<K, V, const MAX_SIZE: usize> Freeze for RedBlackTree<K, V, MAX_SIZE>
impl<K, V, const MAX_SIZE: usize> RefUnwindSafe for RedBlackTree<K, V, MAX_SIZE>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V, const MAX_SIZE: usize> Send for RedBlackTree<K, V, MAX_SIZE>
impl<K, V, const MAX_SIZE: usize> Sync for RedBlackTree<K, V, MAX_SIZE>
impl<K, V, const MAX_SIZE: usize> Unpin for RedBlackTree<K, V, MAX_SIZE>
impl<K, V, const MAX_SIZE: usize> UnwindSafe for RedBlackTree<K, V, MAX_SIZE>where
K: UnwindSafe,
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.