aboutsummaryrefslogtreecommitdiffstats
path: root/src/thread.rs
diff options
context:
space:
mode:
authorDirk Van Haerenborgh <vhdirk@gmail.com>2018-03-23 11:56:52 +0100
committerDirk Van Haerenborgh <vhdirk@gmail.com>2018-03-23 11:56:52 +0100
commit7719c3b31f67eded7af6cd63d99b56c0f74c97cd (patch)
tree9baa207493944912204e4452ccad85c8e6170d13 /src/thread.rs
parentc7f1127b960d1208b12a1abbd33885826fb6dd0c (diff)
downloadmail-7719c3b31f67eded7af6cd63d99b56c0f74c97cd.tar.gz
wip
Diffstat (limited to 'src/thread.rs')
-rw-r--r--src/thread.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/thread.rs b/src/thread.rs
index 2743f0a..87e1f0c 100644
--- a/src/thread.rs
+++ b/src/thread.rs
@@ -15,6 +15,8 @@ use utils::{
ToStr
};
use Query;
+use Messages;
+use Tags;
#[derive(Debug)]
pub struct Thread<'q, 'd:'q>(
@@ -50,6 +52,28 @@ impl<'q, 'd> Thread<'q, 'd>{
}
}
+
+ pub fn toplevel_messages(self: &Self) -> Messages{
+ Messages::new(unsafe {
+ ffi::notmuch_thread_get_toplevel_messages(self.0)
+ })
+ }
+
+ /// Get a `Messages` iterator for all messages in 'thread' in
+ /// oldest-first order.
+ pub fn messages(self: &Self) -> Messages{
+ Messages::new(unsafe {
+ ffi::notmuch_thread_get_messages(self.0)
+ })
+ }
+
+
+ pub fn tags(self: &Self) -> Tags{
+ Tags::new(unsafe {
+ ffi::notmuch_thread_get_tags(self.0)
+ })
+ }
+
}