From 08a7366e0e561160a2b5a1dc01330f3f7f467469 Mon Sep 17 00:00:00 2001 From: "C. Morgan Hamill" Date: Fri, 20 Mar 2015 11:38:32 -0400 Subject: Add `Database::close()` method. Simple wrapper around notmuch API's `notmuch_database_close()` function. --- src/database.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/database.rs b/src/database.rs index 3955865..1915ffe 100644 --- a/src/database.rs +++ b/src/database.rs @@ -48,6 +48,14 @@ impl Database { Ok(Database(db)) } + pub fn close(self) -> Result<()> { + try!(unsafe { + ffi::notmuch_database_close(self.0) + }.as_result()); + + Ok(()) + } + pub fn compact( path: &P, backup_path: Option<&P>, ) -> Result<()> { -- cgit v1.2.1