add is_empty

This commit is contained in:
NikVolf
2019-10-11 09:00:47 +03:00
parent b9bfc07146
commit f24ec04340

View File

@@ -289,6 +289,10 @@ impl Tree {
pub fn root_node(&self) -> Result<IndexedNode, Error> {
self.resolve_link(self.root)
}
pub fn is_empty(&self) -> bool {
self.stored_count == 0
}
}
/// Reference to the node with link attached.