diff options
| author | C. Morgan Hamill <me@cmhamill.org> | 2015-03-20 18:38:13 +0100 |
|---|---|---|
| committer | C. Morgan Hamill <me@cmhamill.org> | 2015-03-20 18:38:13 +0100 |
| commit | 64c7d51bf507def6a2c660cf5d3cb4163514c5ae (patch) | |
| tree | 137fd72da7ce2fe451a67905cbb8606db9d317e5 | |
| parent | 4226ff7a9a93764ec22721b65c6aac3fdafd85cb (diff) | |
| download | mail-64c7d51bf507def6a2c660cf5d3cb4163514c5ae.tar.gz | |
Add `Database::version()` method.
Simple wrapper around notmuch API's `notmuch_database_get_version()`
function.
| -rw-r--r-- | src/database.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/database.rs b/src/database.rs index 7d09e24..3feca76 100644 --- a/src/database.rs +++ b/src/database.rs @@ -105,6 +105,12 @@ impl Database { ffi::notmuch_database_get_path(self.0) }.to_str().unwrap()) } + + pub fn version(&self) -> Version { + Version(unsafe { + ffi::notmuch_database_get_version(self.0) + }) + } } impl ops::Drop for Database { |
