pub struct NotmuchStore { /* private fields */ }Implementations§
Source§impl NotmuchStore
impl NotmuchStore
pub fn open() -> Result<Self>
pub fn new(paths: Arc<MailPaths>) -> Self
pub fn paths(&self) -> &MailPaths
pub fn notmuch(&self) -> &Notmuch
pub fn index_status(&self) -> Option<IndexStatus>
Sourcepub async fn refresh_index(&self) -> Result<Option<Refreshed>>
pub async fn refresh_index(&self) -> Result<Option<Refreshed>>
Builds or catches up the index, rebuilding it if that is what it takes.
This is the caller that is allowed to be slow — a first build of a 46k inbox is around 80 seconds — so it is never run from a request. The server spawns it at startup and the watcher runs it when the database moves; reads fall through to notmuch for as long as it takes.
Trait Implementations§
Source§impl MailStore for NotmuchStore
impl MailStore for NotmuchStore
Source§async fn count_batch(&self, queries: &[String]) -> Result<Vec<u64>>
async fn count_batch(&self, queries: &[String]) -> Result<Vec<u64>>
The sidebar’s rows are mostly tags, and one saved free-text query among them must not cost every other row its answer — so the ones the index can take are taken, and only the rest reach notmuch, still in one batch.
async fn revision(&self) -> Result<Revision>
async fn accounts(&self) -> Result<Vec<Account>>
async fn search_threads(&self, query: &Query) -> Result<Vec<ThreadSummary>>
async fn count(&self, query: &Query) -> Result<usize>
async fn thread(&self, id: &ThreadId) -> Result<Thread>
async fn message(&self, id: &MessageId) -> Result<Message>
async fn body(&self, id: &MessageId, options: BodyOptions) -> Result<Body>
async fn part(&self, id: &MessageId, part: &PartId) -> Result<Part>
async fn tag(&self, ops: &[TagOp]) -> Result<Revision>
async fn sync( &self, accounts: &[AccountId], progress: &dyn ProgressSink, ) -> Result<SyncReport>
async fn send(&self, account: &AccountId, raw: &[u8]) -> Result<()>
async fn doctor(&self) -> Doctor
Auto Trait Implementations§
impl !Freeze for NotmuchStore
impl !RefUnwindSafe for NotmuchStore
impl !UnwindSafe for NotmuchStore
impl Send for NotmuchStore
impl Sync for NotmuchStore
impl Unpin for NotmuchStore
impl UnsafeUnpin for NotmuchStore
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