aboutsummaryrefslogtreecommitdiffstats
path: root/src/ffi.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ffi.rs')
-rw-r--r--src/ffi.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ffi.rs b/src/ffi.rs
index 58965cc..765b180 100644
--- a/src/ffi.rs
+++ b/src/ffi.rs
@@ -54,6 +54,10 @@ impl notmuch_status_t {
}
}
+ pub fn is_err(&self) -> bool {
+ !self.is_ok()
+ }
+
pub fn as_result(self) -> Result<(), Self> {
match self.is_ok() {
true => Ok(()),