From 6a8351b4d67218d36d770add8e27f5bdbcd3d971 Mon Sep 17 00:00:00 2001 From: davidemazzocchi Date: Tue, 11 Nov 2025 11:02:24 +0100 Subject: [PATCH] doc: update documentation of catalog.init --- 01.workspace/heave/src/imp/catalog_init.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/01.workspace/heave/src/imp/catalog_init.rs b/01.workspace/heave/src/imp/catalog_init.rs index f7ab991..b5cd2b7 100644 --- a/01.workspace/heave/src/imp/catalog_init.rs +++ b/01.workspace/heave/src/imp/catalog_init.rs @@ -12,6 +12,11 @@ impl Catalog { /// - **Database State:** Creates the SQLite file and required tables if they are not /// present. If the file already exists, it does nothing. /// - **In-Memory State:** This method does not alter the in-memory entity cache. + /// + /// # Errors + /// + /// Returns `Err(FailedTo::InitDatabase)` if there is an issue creating the + /// database file or initializing its schema. pub fn init(&self) -> result::Result<(), FailedTo> { let path = path::Path::new(&self.path); sqlite::init::db(path).map_err(|_| FailedTo::InitDatabase)?;