1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
use anyhow::Ok; pub struct Library { path: String, tree: LibNode, } pub enum LibNode { Directory(LibDirectory), Item(LibItem), } pub struct LibDirectory {} pub struct LibItem {} impl Library { pub fn open(path: &str) -> anyhow::Result<Self> { Ok(Self { path: path.to_string(), tree: , }) } }