pub struct MessageIndex { /* private fields */ }Implementations§
Source§impl MessageIndex
impl MessageIndex
pub fn file_name() -> &'static str
pub fn path_for(paths: &MailPaths) -> PathBuf
pub fn open(paths: &MailPaths) -> Result<Self>
pub fn open_at(path: &Path, exclude_tags: Vec<String>) -> Result<Self>
pub fn in_memory(exclude_tags: Vec<String>) -> Result<Self>
pub fn revision(&self) -> Result<Option<Revision>>
pub fn message_count(&self) -> Result<u64>
pub fn status(&self) -> IndexStatus
Sourcepub fn search_threads(
&self,
query: &Query,
) -> Result<Option<Vec<ThreadSummary>>>
pub fn search_threads( &self, query: &Query, ) -> Result<Option<Vec<ThreadSummary>>>
None when the query is not one the index can answer identically.
pub fn count(&self, text: &str) -> Result<Option<u64>>
Sourcepub fn apply(&self, messages: &[Message], revision: &Revision) -> Result<()>
pub fn apply(&self, messages: &[Message], revision: &Revision) -> Result<()>
Replaces what the index holds for these messages, in one transaction, and moves the watermark with them. A refresh interrupted halfway therefore resumes from the last chunk that landed rather than starting over.
pub fn clear(&self) -> Result<()>
Auto Trait Implementations§
impl !Freeze for MessageIndex
impl RefUnwindSafe for MessageIndex
impl Send for MessageIndex
impl Sync for MessageIndex
impl Unpin for MessageIndex
impl UnsafeUnpin for MessageIndex
impl UnwindSafe for MessageIndex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more