#[repr(C, packed(1))]pub struct BTreeNode {
pub node_type: u8,
pub num_keys: u8,
pub padding: [u8; 2],
pub keys: [[u8; 16]; 25],
pub values: [u32; 26],
}Expand description
ディスク上のB-Treeノード (データサイズ 508 バイト = セクタデータ領域ちょうど)。 挿入は「挿入→満杯なら分割」方式のため num_keys は分割直前に一時的に MAX_KEYS+1 まで増える。 その一時オーバーフローを格納できるよう keys は MAX_KEYS+1、values は内部ノードの スライド (values[i+2]) と最右子ポインタを賄うため MAX_KEYS+2 を確保する。 永続化されるノードの num_keys は分割により常に MAX_KEYS 以下。
Fields§
§node_type: u8§num_keys: u8§padding: [u8; 2]§keys: [[u8; 16]; 25]§values: [u32; 26]Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BTreeNode
impl RefUnwindSafe for BTreeNode
impl Send for BTreeNode
impl Sync for BTreeNode
impl Unpin for BTreeNode
impl UnsafeUnpin for BTreeNode
impl UnwindSafe for BTreeNode
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