BtreeNode

Struct BtreeNode 

Source
#[repr(C, align(8))]
pub struct BtreeNode<'a, K, V> { /* private fields */ }

Implementations§

Source§

impl<'a, K, V> BtreeNode<'a, K, V>
where K: Copy + Display + PartialOrd, V: Copy + Display,

Source

pub fn from_slice(buf: &[u8]) -> Self

Source

pub fn new(v: V, size: usize) -> Option<Self>

Source

pub fn copy_from_slice(v: V, buf: &[u8]) -> Option<Self>

Source

pub fn as_ref(&self) -> &[u8]

Source

pub fn as_mut(&mut self) -> &mut [u8]

Source

pub fn is_large(&self) -> bool

Source

pub fn set_large(&mut self)

Source

pub fn clear_large(&mut self)

Source

pub fn get_flags(&self) -> u8

Source

pub fn set_flags(&mut self, flags: usize)

Source

pub fn get_level(&self) -> usize

Source

pub fn set_level(&mut self, level: usize)

Source

pub fn get_key(&self, index: usize) -> K

Source

pub fn set_key(&mut self, index: usize, key: &K)

Source

pub fn get_val(&self, index: usize) -> V

Source

pub fn set_val(&mut self, index: usize, val: &V)

Source

pub fn get_nchild(&self) -> usize

Source

pub fn set_nchild(&mut self, c: usize)

Source

pub fn set_nchild_use_p(&self, c: usize)

Source

pub fn get_capacity(&self) -> usize

Source

pub fn has_free_slots(&self) -> bool

Source

pub fn get_nchild_min(&self) -> usize

Source

pub fn is_overflowing(&self) -> bool

Source

pub fn node_key(&self) -> &K

Source

pub fn id(&self) -> Option<&V>

Source

pub fn set_id(&mut self, v: V)

Source

pub fn init(&mut self, flags: usize, level: usize, nchild: usize)

Source

pub fn init_root(&mut self, level: usize, is_large: bool)

Source

pub fn is_dirty(&self) -> bool

Source

pub fn mark_dirty(&mut self)

Source

pub fn clear_dirty(&mut self)

Source

pub fn move_left( left: &BtreeNode<'_, K, V>, right: &BtreeNode<'_, K, V>, n: usize, )

Source

pub fn move_right( left: &BtreeNode<'_, K, V>, right: &BtreeNode<'_, K, V>, n: usize, )

Source

pub fn lookup(&self, key: &K) -> (bool, usize)

Source

pub fn insert(&mut self, index: usize, key: &K, val: &V)

Source

pub fn delete(&mut self, index: usize, key: &mut K, val: &mut V)

Trait Implementations§

Source§

impl<'a, K: Debug, V: Debug> Debug for BtreeNode<'a, K, V>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, K, V> Display for BtreeNode<'a, K, V>
where K: Copy + Display + PartialOrd, V: Copy + Display,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, K, V> Drop for BtreeNode<'a, K, V>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<'a, K, V> PartialEq for BtreeNode<'a, K, V>

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

§

impl<'a, K, V> Freeze for BtreeNode<'a, K, V>
where V: Freeze,

§

impl<'a, K, V> RefUnwindSafe for BtreeNode<'a, K, V>

§

impl<'a, K, V> !Send for BtreeNode<'a, K, V>

§

impl<'a, K, V> !Sync for BtreeNode<'a, K, V>

§

impl<'a, K, V> !Unpin for BtreeNode<'a, K, V>

§

impl<'a, K, V> !UnwindSafe for BtreeNode<'a, K, V>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.