pub fn btree_insert(btree: CellRef, key_value: (CellRef, CellRef)) -> Result<CellRef, RuntimeError> {
    match btree_insert_internal(&btree, key_value.0, key_value.1) {
        BTreeInsertResult::NewBTree(result)                 => Ok(result),
        BTreeInsertResult::Split(left, right, median_key)   => Ok(SafasCell::BTree(vec![median_key], vec![left, right]).into()),
        BTreeInsertResult::Err(err)                         => Err(err)
    }
}
///
/// Attempts to insert a value in a B-Tree cell
///
Attempts to insert a value in a B-Tree cell
Attempts to insert a value in a B - Tree cell
pub fn btree_insert(btree: CellRef, key_value: (CellRef, CellRef)) -> Result<CellRef, RuntimeError> {
    match btree_insert_internal(&btree, key_value.0, key_value.1) {
        BTreeInsertResult::NewBTree(result)                 => Ok(result),
        BTreeInsertResult::Split(left, right, median_key)   => Ok(SafasCell::BTree(vec![median_key], vec![left, right]).into()),
        BTreeInsertResult::Err(err)                         => Err(err)
    }
}
pub fn btree_insert ( btree : CellRef , key_value : ( CellRef , CellRef ) ) -> Result < CellRef , RuntimeError > { match btree_insert_internal ( & btree , key_value . 0 , key_value . 1 ) { BTreeInsertResult :: NewBTree ( result ) => Ok ( result ) , BTreeInsertResult :: Split ( left , right , median_key ) => Ok ( SafasCell :: BTree ( vec ! [ median_key ] , vec ! [ left right ] ) . into ( ) ) , BTreeInsertResult :: Err ( err ) => Err ( err ) } }
Attempts to insert a value in a B-Tree cell
Attempts to insert a value in a B - Tree cell
btree
CellRef
key_value
(CellRef, CellRef)
btree
CellRef
key_value
(CellRef, CellRef)