diff options
Diffstat (limited to 'src/db/sled_adapter.rs')
-rw-r--r-- | src/db/sled_adapter.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/db/sled_adapter.rs b/src/db/sled_adapter.rs index cf61867d..31a4889f 100644 --- a/src/db/sled_adapter.rs +++ b/src/db/sled_adapter.rs @@ -88,6 +88,15 @@ impl IDb for SledDb { Ok(trees) } + fn tree_name(&self, tree: usize) -> Option<String> { + self.trees + .read() + .unwrap() + .0 + .get(tree) + .and_then(|x| String::from_utf8(x.name().to_vec()).ok()) + } + // ---- fn get(&self, tree: usize, key: &[u8]) -> Result<Option<Value>> { |