Skip to main content

update

Function update 

Source
pub fn update(
    accounts: &[Account],
    password: &dyn Fn(&Account) -> Result<String, SyncError>,
    dirs: &Dirs,
    room: &dyn Fn(&Path) -> Option<u64>,
    progress: &mut dyn FnMut(&Progress),
    cancel: &Cancel,
) -> Update
Expand description

Brings the corpus up to date: every account given, every folder kept (kept), what is new since the last time. password gives an account’s password as the sync uses it (sioul_sync::secret::password); room the free space on a disk (free_space; tests say less).

Each message added is checked as it comes (Checked), and then the messages kept before without checks (verify’s work).

Progress: first one Progress { stage: Corpus, detail: "", done: 0, total } with about how many messages are to come in all (each kept folder’s MESSAGES, less those recorded); then, folder after folder, detail “account · folder” with that folder’s done of total; then, account after account with messages kept unchecked, Verify with detail the account and its done of total.