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

Trait Implementations

Derived Implementations

impl<T: Encodable + PartialOrd + KnownSize + Debug> Encodable for Bnode<T>

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl<T: Decodable + PartialOrd + KnownSize + Debug> Decodable for Bnode<T>

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Bnode<T>, __D::Error>

impl<T: Debug + PartialOrd + KnownSize + Debug> Debug for Bnode<T>

fn fmt(&self, __arg_0: &mut Formatter) -> Result