use anyhow::Context; #[derive(Debug)] pub struct Database { db: sled::Db, } impl Database { pub fn open(path: &str) -> Result { let db = sled::open(path).context("opening database")?; Ok(Self { db }) } }