//! MAIL PREDICATE (the coordinator, 26 Nov 2026): the one place that says, in SQL, whether a mail (or a//! conversation) is live, binned, unread or read. Every reader of a person's mail asks here (Post, Comms, Days, search,//! the assistant's tools on the phone and on the Worker), never spelling `trashed_at` or `unread` itself, so a later//! way of binning or reading many mails at once (one row for a whole act, as Archive's `email_cut`) changes this file//! and every reader follows.//!//! Each takes `on`, the prefix of the mail's columns in the query: `""`, `"e."`, `"cotton_emails."`. The answer is a//! parenthesised SQL condition with no parameters, so it drops into any `WHERE` beside the caller's own `?`s. Each//! keeps the spelling the store's partial indexes are written against (`trashed_at IS NULL` in//! `idx_cotton_emails_inbox`, `_files`, `_archived`; `unread = 1`), so the planner still finds them.//!//! Writers (the acts that set `trashed_at` or `unread`) are not readers and do not come here./// A mail that is not in the Bin: neither its own `trashed_at` nor a Delete of its sender ([`cuts`], phase 2).pubfn live(on: &str) -> String { cuts::live(on)}/// A mail in the Bin.pubfn binned(on: &str) -> String { cuts::binned(on)}/// A mail not yet read: its own `unread` (written 0 or 1) and no Mark read of many.pubfn unread(on: &str) -> String { cuts::unread(on)}/// A mail read.pubfn read(on: &str) -> String { cuts::read(on)}/// A conversation not in the Bin: one of its mails is live (derived, never its stored `trashed_at`).pubfn live_thread(on: &str) -> String { cuts::live_thread(on)}/// A conversation in the Bin: it holds opened mail and none is live.pubfn binned_thread(on: &str) -> String { cuts::binned_thread(on)}/// When a mail went to the Bin: its own `trashed_at`, else its Delete's moment.pubfn binned_at(on: &str) -> String { cuts::binned_at(on)}/// A live mail an Archive of its sender covers.pubfn archived(on: &str) -> String { cuts::archived(on)}#[path = "cuts.rs"]pubmod cuts;