Struct server::storage::bstar::Bnode
[−]
[src]
pub struct Bnode<T: PartialOrd + KnownSize + Debug> { pub node_list: SortedList<KeyAddr<T>>, pub father: u64, pub leftbrother: Option<u64>, pub rightbrother: Option<u64>, pub is_leaf: bool, pub is_root: bool, // some fields omitted }
Fields
node_list | |
father | |
leftbrother | |
rightbrother | |
is_leaf | |
is_root |
Methods
impl<T: PartialOrd + KnownSize + Debug> Bnode<T>
fn create(node_list: SortedList<KeyAddr<T>>, father: u64, leftbrother: Option<u64>, rightbrother: Option<u64>, is_leaf: bool, is_root: bool, order: u64) -> Bnode<T>
[−]
creates a new Bnode Object all u64 fields are addresses to other nodes
fn read(file: &mut File, addr: Option<u64>) -> Result<Bnode<T>>
[−]
reads a Bnode from disc at the specefied addr in the specified file
fn write(&mut self, file: &mut File, addr: Option<u64>) -> Result<()>
[−]
writes a Bnode from disc at the specefied addr in the specified file
fn size(order: u64) -> u64
[−]
returns the size of the Bnode calculated using the order of the hosting B* tree