diff options
Diffstat (limited to 'src/thread.rs')
| -rw-r--r-- | src/thread.rs | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/thread.rs b/src/thread.rs index 980ff39..cf5440c 100644 --- a/src/thread.rs +++ b/src/thread.rs @@ -11,21 +11,28 @@ use ffi; use utils::{ NewFromPtr, }; -use Database; +use Query; #[derive(Debug)] -pub struct Thread<'d>( +pub struct Thread<'q, 'd:'q>( pub(crate) *mut ffi::notmuch_thread_t, - marker::PhantomData<&'d mut Database>, + marker::PhantomData<&'q mut Query<'d>>, ); -impl<'d> NewFromPtr<*mut ffi::notmuch_thread_t> for Thread<'d> { - fn new(ptr: *mut ffi::notmuch_thread_t) -> Thread<'d> { +impl<'q, 'd> NewFromPtr<*mut ffi::notmuch_thread_t> for Thread<'q, 'd> { + fn new(ptr: *mut ffi::notmuch_thread_t) -> Thread<'q, 'd> { Thread(ptr, marker::PhantomData) } } -impl<'d> ops::Drop for Thread<'d> { +// impl<'d> Thread<'d>( +// +// +// +// }; +// + +impl<'q, 'd> ops::Drop for Thread<'q, 'd> { fn drop(&mut self) { unsafe { ffi::notmuch_thread_destroy(self.0) |
