pub enum AutoSyncPolicy {
Manual,
Books,
All,
}Expand description
The automatic-sync scope. Ordered least- to most-inclusive:
Manual < Books < All. The default is AutoSyncPolicy::Books, so
book-like documents sync automatically while one-off reports and scratch
text stay on the device until explicitly opted in.
Variants§
Manual
Only documents the user has explicitly opted in sync automatically — the “semi-automatic” mode. Manual sync still works on any document.
Books
Documents that look like a book (see looks_like_book) sync
automatically, plus any explicit per-document opt-ins. The default.
All
Every document syncs automatically (the historical all-in behavior).
Implementations§
Source§impl AutoSyncPolicy
impl AutoSyncPolicy
Sourcepub fn from_token_or_default(s: &str) -> AutoSyncPolicy
pub fn from_token_or_default(s: &str) -> AutoSyncPolicy
Parse a stored/wire/config token, falling back to the default
(AutoSyncPolicy::Books) for anything unrecognized so a bad value never
silently disables or over-enables sync. Also accepts the legacy boolean
AUTO_SYNC values so older configs migrate: true → books (the new
default) and false → manual (no automatic sync, still opt-in-able).