diff options
| -rw-r--r-- | src/directory.rs | 9 | ||||
| -rw-r--r-- | src/ffi.rs | 2 | ||||
| -rw-r--r-- | src/message.rs | 2 | ||||
| -rw-r--r-- | src/thread.rs | 2 |
4 files changed, 12 insertions, 3 deletions
diff --git a/src/directory.rs b/src/directory.rs index 7b00d70..c3b313b 100644 --- a/src/directory.rs +++ b/src/directory.rs @@ -8,6 +8,7 @@ use utils::{ }; use Database; +use Filenames; use ffi; @@ -17,6 +18,14 @@ pub struct Directory<'d>( marker::PhantomData<&'d mut Database>, ); +impl<'d> Directory<'d>{ + pub fn child_directories(self: &Self) -> Filenames<'d>{ + Filenames::new(unsafe { + ffi::notmuch_directory_get_child_directories(self.0) + }) + } +} + impl<'d> NewFromPtr<*mut ffi::notmuch_directory_t> for Directory<'d> { fn new(ptr: *mut ffi::notmuch_directory_t) -> Directory<'d> { Directory(ptr, marker::PhantomData) @@ -102,7 +102,7 @@ notmuch_enum! { NOTMUCH_SORT_OLDEST_FIRST => OldestFirst, NOTMUCH_SORT_NEWEST_FIRST => NewestFirst, NOTMUCH_SORT_MESSAGE_ID => MessageID, - NOTMUCH_SORT_UNSORTED => ReadWrite + NOTMUCH_SORT_UNSORTED => Unsorted } } diff --git a/src/message.rs b/src/message.rs index 6edfd7e..ec4473f 100644 --- a/src/message.rs +++ b/src/message.rs @@ -52,7 +52,7 @@ impl<'q, 'd> Message<'q, 'd>{ ffi::notmuch_message_get_replies(self.0) }) } - +#[cfg(feature = "0.26")] pub fn count_files(self: &Self) -> i32 { unsafe { diff --git a/src/thread.rs b/src/thread.rs index 9148c44..98832a6 100644 --- a/src/thread.rs +++ b/src/thread.rs @@ -46,7 +46,7 @@ impl<'q, 'd> Thread<'q, 'd>{ ffi::notmuch_thread_get_total_messages(self.0) } } - +#[cfg(feature = "0.26")] pub fn total_files(self: &Self) -> i32{ unsafe { ffi::notmuch_thread_get_total_files(self.0) |
