Expand description
Searching the mail by conditions, for the Mail page (docs/client.md, “Searching”).
The page sends its conditions (sioul_core::mailsearch::Search, as JSON);
the mail kept here is looked through at once, on every core, each message
read as little as its conditions need; then, after a pause in typing, the
servers are asked for what they hold and this device does not (folders
left on the server, older mail still waiting for room: fetch::kept),
one connection per address (sioul_sync::search). Both parts merge into
one list, newest first, without twins: a message kept here is never shown
again from its server (same address, folder, UIDVALIDITY and UID), nor a
copy of it in another folder of the same address (same Message-ID: Gmail’s
labels). The page reads mailSearch: the sentence, what the servers said,
the rows. A row seen on its server only is brought here when opened.
Structs§
- Brought 🔒
- Fields 🔒
- Hit 🔒
- One message found, here or on its server, as the list shows it and as the merge compares it.
- Row 🔒
- A row of the list: the folder’s own (
view::MailItem), and where it is. - Search
View 🔒 - What the page shows of the search.
- State 🔒
Enums§
- Server
Part 🔒 - What an address’s server said.
Constants§
- PAUSE 🔒
- The servers are asked after this pause in typing (Enter asks at once).
- PER_
SERVER 🔒 - Messages asked of each server at most, the newest first.
- SHOWN 🔒
- Rows shown at most: past them, the sentence says how many more.
Statics§
- GENERATION 🔒
- The search being made: an older one gives up as soon as it sees a newer one.
- PUBLISHED 🔒
- What the page was last given: the same again is not sent (the list would be laid out anew, its scrolling lost, at every fetch).
- RESCANNING 🔒
- A rescan of the mail kept here is running (after files moved).
- STATE 🔒
Functions§
- account_
title 🔒 - ask_
servers 🔒 - Asks each address’s server, each on a thread of its own; their answers show as they come.
- bring 🔒
- Brings a message seen on its server only here, then has the page open it.
- changed 🔒
- The mail changed (a move done or undone, a fetch): the search shows it. A message whose file is gone (moved, renamed by a sync) has the mail kept here looked through again, without asking the servers again.
- clear 🔒
- The search closed: the page shows its folder again.
- current 🔒
- empty_
item 🔒 - A row’s place holder while the merge runs: its key alone.
- fields 🔒
- What the search’s column offers, in your language, with your addresses and folders.
- folder_
title 🔒 - A folder’s name as the list says it: its purpose, else its own name (Gmail’s prefix aside); Gmail’s “All Mail” is its archive when it has none.
- forget 🔒
- Messages acted on from their server (moved, archived, deleted): out of the list.
- kept_
dir 🔒 - A folder kept here (the inbox always is), as a folder of its own: one name under the account’s Maildir.
- marked 🔒
- A server row’s marks changed (read, flagged): the row says it.
- merged 🔒
- The newest first; a message twice in one address (its Message-ID) once, from the folder that ranks first.
- names_
sentence 🔒 - The sentence’s names for addresses and folders.
- needs_
server 🔒 - Whether a folder’s server must be asked: left on the server, or not all of it kept here for the days searched. The server counts the days of its fetch by its own clock: a search reaching within a day of them asks it too.
- publish 🔒
- Shows the search on the page, when it changed.
- rank 🔒
- The rank of a folder when one message is in two (Gmail’s labels): the one you sort from first.
- scan 🔒
- Looks through the mail kept here, on every core. None when a newer search came first.
- search 🔒
- A new search from the page: the mail here at once, the servers after a
pause in typing (
now: at once, Enter was pressed). - searched 🔒
- The folders a search looks in, of an account: those a list shows (Gmail’s “All Mail” only where it stands for the archive), those it can reach.
- senders 🔒
- Who a sender is to you, when a condition asks it (
porch::Senders). - server_
hit 🔒 - A message its server found, as a row.
- trusted 🔒
- Which messages the trust marks believe, per account (as the folder’s list).
- view_
now 🔒 - The view, from what is known now: what waits ten seconds for “Undo” left out.
- with_
state 🔒