initial commit with code I worked on in rust-playground

This commit is contained in:
2026-03-26 17:44:10 -04:00
parent 037ae5eeab
commit 91a3dc4546
4 changed files with 125 additions and 0 deletions

20
main.rs Normal file
View File

@@ -0,0 +1,20 @@
mod blocktree;
use crate::blocktree::{NoteBlock, NotePage};
fn main() {
let root_block = NoteBlock::new(0,Some(1),Some(2),String::from("hello"));
let mut page = NotePage::new(String::from("page 1"), 0, root_block);
let new_block = NoteBlock::new(1,None,None, String::from("world"));
page.insert(new_block);
let new_block = NoteBlock::new(2,Some(3),None, String::from("world"));
page.insert(new_block);
let new_block = NoteBlock::new(3,Some(4),None, String::from("world"));
page.insert(new_block);
let new_block = NoteBlock::new(4,None,None, String::from("world"));
page.insert(new_block);
page.build_tree();
println!("{:?}", page);
// println!("{:?}", page.block_tree_root.first_child_node)
}