calternal-sync
Local sync decisions are based on a durable three-way journal. A client records a new baseline only after it verifies a completed transfer. The planner has no filesystem side effects, so a crash before that commit retries work against the old baseline instead of forgetting bytes. Remote write retries stop when the server cannot identify an operation (#814). Agent callers can retain HTTP error fields through an opt-in client hook; default daemon error variants keep their existing recovery semantics (#835).
Source: crates/calternal-sync/src/lib.rs
Structs
Section titled “Structs”Change
Section titled “Change”pub struct ChangeNo doc comment.
Fields
pub cursor: i64pub operation: Stringpub path: Stringpub old_path: Option<String>pub item_id: Stringpub content_hash: Option<String>pub size: i64pub mtime: i64
Implements: Clone, Debug, Deserialize, Eq, PartialEq
Source: crates/calternal-sync/src/remote.rs:161
ChangePage
Section titled “ChangePage”pub struct ChangePageNo doc comment.
Fields
pub entries: Vec<Change>pub cursor: i64
Implements: Clone, Debug, Deserialize, Eq, PartialEq
Source: crates/calternal-sync/src/remote.rs:173
ConflictRecord
Section titled “ConflictRecord”pub struct ConflictRecordNo doc comment.
Fields
pub path: Stringpub original_path: Stringpub created_at: i64
Implements: Clone, Debug, Eq, PartialEq
Source: crates/calternal-sync/src/journal.rs:41
InventoryEntry
Section titled “InventoryEntry”pub struct InventoryEntryNo doc comment.
Fields
pub path: Stringpub item_id: Option<String>pub hash: Stringpub size: u64pub mtime: i64pub file_id: Option<String>
Implements: Clone, Debug, Eq, PartialEq
Source: crates/calternal-sync/src/plan.rs:12
Journal
Section titled “Journal”pub struct JournalNo doc comment.
Implements: Clone
Journal::open
Section titled “Journal::open”pub async fn open(path: &Path) -> Result<Self, Error>No doc comment.
Journal::entries
Section titled “Journal::entries”pub async fn entries(&self) -> Result<Vec<JournalEntry>, Error>No doc comment.
Journal::remote_entries
Section titled “Journal::remote_entries”pub async fn remote_entries(&self) -> Result<Vec<RemoteFile>, Error>Read the last durable remote inventory. It is separate from entries:
a path can be deferred locally while its remote change is still
acknowledged in the feed.
Journal::commit_remote_snapshot
Section titled “Journal::commit_remote_snapshot”pub async fn commit_remote_snapshot( &self, upserts: &[RemoteFile], removed_paths: &[String], cursor: i64, scope: &str, replace: bool, full_scan_at: Option<i64>, ) -> Result<(), Error>Persist feed changes with the remote cursor. A full inventory replaces the table and may rebase the cursor after feed expiry or server restore.
Journal::commit_verified_batch
Section titled “Journal::commit_verified_batch”pub async fn commit_verified_batch( &self, entries: &[JournalEntry], removed_paths: &[String], cursor: i64, ) -> Result<(), Error>Commit a verified baseline and its legacy cursor as a unit. The sync
engine stores the remote feed cursor with remote_entries instead.
Journal::commit_verified_sync_batch
Section titled “Journal::commit_verified_sync_batch”pub async fn commit_verified_sync_batch( &self, entries: &[JournalEntry], removed_paths: &[String], cursor: i64, tag_updates: &[(String, BTreeSet<String>)], removed_tag_paths: &[String], finder_tags_initialized: bool, ) -> Result<(), Error>Commit file revisions, Finder tag baselines, and the legacy cursor in one transaction after all local and server writes have succeeded.
Journal::cursor
Section titled “Journal::cursor”pub async fn cursor(&self) -> Result<i64, Error>No doc comment.
Journal::remote_cursor
Section titled “Journal::remote_cursor”pub async fn remote_cursor(&self) -> Result<i64, Error>The remote inventory cursor is separate from the verified sync baseline cursor in old journals. Fall back to the old key on upgrade.
Journal::remote_scope
Section titled “Journal::remote_scope”pub async fn remote_scope(&self) -> Result<Option<String>, Error>No doc comment.
Journal::local_root_identity
Section titled “Journal::local_root_identity”pub async fn local_root_identity(&self) -> Result<Option<String>, Error>The identity of the local sync root. The client stores this outside the root and checks it before it plans any destructive action.
Journal::set_local_root_identity
Section titled “Journal::set_local_root_identity”pub async fn set_local_root_identity(&self, identity: &str) -> Result<(), Error>Persist a verified local root identity before the engine may apply feed deltas or propagate local deletions.
Journal::remote_full_scan_at
Section titled “Journal::remote_full_scan_at”pub async fn remote_full_scan_at(&self) -> Result<Option<i64>, Error>The last full remote inventory committed with its cursor.
Journal::finder_tag_baselines
Section titled “Journal::finder_tag_baselines”pub async fn finder_tag_baselines(&self) -> Result<BTreeMap<String, BTreeSet<String>>, Error>Finder tag baselines are separate from file hashes because xattrs do not alter file bytes and must survive daemon restarts.
Journal::finder_tags_initialized
Section titled “Journal::finder_tags_initialized”pub async fn finder_tags_initialized(&self) -> Result<bool, Error>No doc comment.
Journal::save_pending
Section titled “Journal::save_pending”pub async fn save_pending(&self, pending: &PendingUpload) -> Result<(), Error>No doc comment.
Journal::pending
Section titled “Journal::pending”pub async fn pending(&self) -> Result<Vec<PendingUpload>, Error>No doc comment.
Journal::record_download_temp
Section titled “Journal::record_download_temp”pub async fn record_download_temp(&self, relative: &str) -> Result<(), Error>Record the exact temp pathname before opening it. Recovery can remove only this daemon’s partial download, without guessing from a prefix.
Journal::clear_download_temp
Section titled “Journal::clear_download_temp”pub async fn clear_download_temp(&self, relative: &str) -> Result<(), Error>No doc comment.
Journal::recover_download_temps
Section titled “Journal::recover_download_temps”pub async fn recover_download_temps(&self, root: &Path) -> Result<(), Error>Startup removes only paths recorded before a download began. A completed rename has no temp left, so its stale record is harmless.
Journal::record_conflict
Section titled “Journal::record_conflict”pub async fn record_conflict(&self, conflict: &ConflictRecord) -> Result<(), Error>No doc comment.
Journal::conflicts
Section titled “Journal::conflicts”pub async fn conflicts(&self) -> Result<Vec<ConflictRecord>, Error>No doc comment.
Journal::read_conflicts
Section titled “Journal::read_conflicts”pub async fn read_conflicts(path: &Path) -> Result<Vec<ConflictRecord>, Error>The CLI can inspect conflicts while the daemon owns the pair’s writer lock. SQLite readers see a committed snapshot in WAL mode.
Source: crates/calternal-sync/src/journal.rs:48
JournalEntry
Section titled “JournalEntry”pub struct JournalEntryNo doc comment.
Fields
pub path: Stringpub item_id: Option<String>pub hash: Stringpub size: u64pub mtime: i64pub file_id: Option<String>
Implements: Clone, Debug, Eq, PartialEq
Source: crates/calternal-sync/src/journal.rs:22
LocalWatcher
Section titled “LocalWatcher”pub struct LocalWatcherNo doc comment.
LocalWatcher::new
Section titled “LocalWatcher::new”pub fn new(root: &Path) -> Result<Self, Error>No doc comment.
LocalWatcher::next_change
Section titled “LocalWatcher::next_change”pub async fn next_change(&mut self) -> Result<(), Error>Return after one event. Debounce belongs to the caller after this future completes: a cancelled select arm must never consume a wake-up.
Read-only access events do not count: a reconcile pass opens and hashes every file, and treating those opens as changes made the daemon rescan in a loop forever (several % CPU while idle). A watcher error (for example a queue overflow) is a wake-up, not a reason to stop the pair; the scan finds what the queue lost.
Source: crates/calternal-sync/src/local.rs:1257
PendingUpload
Section titled “PendingUpload”pub struct PendingUploadNo doc comment.
Fields
pub path_at_detection: Stringpub file_id: Stringpub hash_at_detection: Stringpub upload_id: Option<String>pub upload_offset: u64
Implements: Clone, Debug, Eq, PartialEq
Source: crates/calternal-sync/src/journal.rs:32
RemoteClient
Section titled “RemoteClient”pub struct RemoteClientNo doc comment.
Implements: Clone
RemoteClient::new
Section titled “RemoteClient::new”pub fn new(server_url: &str, token: String) -> Result<Self, Error>No doc comment.
RemoteClient::new_with_policy
Section titled “RemoteClient::new_with_policy”pub fn new_with_policy( server_url: &str, token: String, timeout: Duration, retries: u8, ) -> Result<Self, Error>Build a CLI client with a per-request timeout and bounded retry count.
The sync daemon keeps using Self::new and therefore keeps its
existing request timing and retry behavior.
RemoteClient::with_http_details
Section titled “RemoteClient::with_http_details”pub fn with_http_details(mut self) -> SelfPreserve server error fields for an agent caller without changing the daemon’s cursor, precondition and status handling (#835, DESIGN §41).
RemoteClient::changes
Section titled “RemoteClient::changes”pub async fn changes(&self, cursor: i64, limit: u16) -> Result<ChangePage, Error>No doc comment.
RemoteClient::head_cursor
Section titled “RemoteClient::head_cursor”pub async fn head_cursor(&self) -> Result<i64, Error>No doc comment.
RemoteClient::list_tree
Section titled “RemoteClient::list_tree”pub async fn list_tree(&self, remote_folder: &str) -> Result<Vec<RemoteFile>, Error>List the remote snapshot used for a first baseline, an expired cursor,
or the periodic consistency check. Folders are listed
LIST_CONCURRENCY at a time. One request per folder, one after the
other, made the listing of a tree with 100 folders the largest part of
every pass (#46); the server answers independent folder listings in
parallel.
RemoteClient::download
Section titled “RemoteClient::download”pub async fn download(&self, path: &str) -> Result<Response, Error>No doc comment.
RemoteClient::stat_file
Section titled “RemoteClient::stat_file”pub async fn stat_file(&self, path: &str) -> Result<RemoteFile, Error>No doc comment.
RemoteClient::mkdir
Section titled “RemoteClient::mkdir”pub async fn mkdir(&self, path: &str) -> Result<(), Error>No doc comment.
RemoteClient::is_directory
Section titled “RemoteClient::is_directory”pub async fn is_directory(&self, path: &str) -> Result<bool, Error>Is path a folder? Folders have no content hash, so moving or
trashing one cannot carry an If-Match precondition.
RemoteClient::move_if_hash
Section titled “RemoteClient::move_if_hash”pub async fn move_if_hash( &self, source: &str, destination: &str, hash: &str, ) -> Result<(), Error>No doc comment.
RemoteClient::move_path
Section titled “RemoteClient::move_path”pub async fn move_path( &self, source: &str, destination: &str, hash: Option<&str>, ) -> Result<(), Error>Move or rename a file or folder. hash guards a file move against a
concurrent edit; a folder move passes None.
RemoteClient::wakeups
Section titled “RemoteClient::wakeups”pub async fn wakeups(&self) -> Result<Response, Error>No doc comment.
RemoteClient::create_upload
Section titled “RemoteClient::create_upload”pub async fn create_upload( &self, path: &str, length: u64, expected_hash: Option<&str>, ) -> Result<String, Error>No doc comment.
RemoteClient::create_upload_with_mtime
Section titled “RemoteClient::create_upload_with_mtime”pub async fn create_upload_with_mtime( &self, path: &str, length: u64, expected_hash: Option<&str>, source_mtime_ns: Option<i64>, ) -> Result<String, Error>No doc comment.
RemoteClient::create_upload_with_mtime_and_path
Section titled “RemoteClient::create_upload_with_mtime_and_path”pub async fn create_upload_with_mtime_and_path( &self, path: &str, length: u64, expected_hash: Option<&str>, source_mtime_ns: Option<i64>, ) -> Result<(String, Option<String>), Error>Create a TUS upload and return the installed path when the server completed a zero-length upload during creation.
RemoteClient::upload_offset
Section titled “RemoteClient::upload_offset”pub async fn upload_offset(&self, id: &str) -> Result<u64, Error>No doc comment.
RemoteClient::upload_chunk
Section titled “RemoteClient::upload_chunk”pub async fn upload_chunk(&self, id: &str, offset: u64, bytes: Vec<u8>) -> Result<u64, Error>No doc comment.
RemoteClient::upload_chunk_with_path
Section titled “RemoteClient::upload_chunk_with_path”pub async fn upload_chunk_with_path( &self, id: &str, offset: u64, bytes: Vec<u8>, ) -> Result<(u64, Option<String>), Error>Upload one TUS chunk and return the installed path when this chunk completed the upload.
RemoteClient::terminate_upload
Section titled “RemoteClient::terminate_upload”pub async fn terminate_upload(&self, id: &str) -> Result<(), Error>No doc comment.
RemoteClient::trash_if_hash
Section titled “RemoteClient::trash_if_hash”pub async fn trash_if_hash(&self, path: &str, hash: &str) -> Result<(), Error>No doc comment.
RemoteClient::trash_path
Section titled “RemoteClient::trash_path”pub async fn trash_path(&self, path: &str, hash: Option<&str>) -> Result<(), Error>Trash a file or folder. hash guards a file against a concurrent
edit; a folder passes None.
Source: crates/calternal-sync/src/remote.rs:23
RemoteFile
Section titled “RemoteFile”pub struct RemoteFileNo doc comment.
Fields
pub path: Stringpub item_id: Stringpub hash: Stringpub size: u64pub mtime: i64
Implements: Clone, Debug, Eq, PartialEq
Source: crates/calternal-sync/src/remote.rs:179
SyncConfig
Section titled “SyncConfig”pub struct SyncConfigNo doc comment.
Fields
pub device_name: Stringpub pairs: Vec<SyncPair>
Implements: Clone, Debug, Default, Deserialize, Serialize
SyncConfig::load
Section titled “SyncConfig::load”pub fn load() -> Result<Self, Error>Load and validate private sync.json (#920; DESIGN §24).
A missing file gives no pairs and uses the host name, or installation,
as the Installation label. Invalid JSON, permissions, or pair settings
return an error; this does not overwrite the existing file.
SyncConfig::save
Section titled “SyncConfig::save”pub fn save(&self) -> Result<(), Error>No doc comment.
SyncConfig::add
Section titled “SyncConfig::add”pub fn add( &mut self, server_url: String, local_folder: &Path, remote_folder: String, include: Vec<String>, ) -> Result<&SyncPair, Error>No doc comment.
SyncConfig::remove
Section titled “SyncConfig::remove”pub fn remove(&mut self, id: &str) -> boolNo doc comment.
Source: crates/calternal-sync/src/config.rs:133
SyncEngine
Section titled “SyncEngine”pub struct SyncEngineNo doc comment.
SyncEngine::open
Section titled “SyncEngine::open”pub async fn open(pair: SyncPair, device_name: String) -> Result<Self, Error>No doc comment.
SyncEngine::with_token
Section titled “SyncEngine::with_token”pub async fn with_token( pair: SyncPair, device_name: String, token: String, ) -> Result<Self, Error>No doc comment.
SyncEngine::pair
Section titled “SyncEngine::pair”pub fn pair(&self) -> &SyncPairNo doc comment.
SyncEngine::deferred_paths
Section titled “SyncEngine::deferred_paths”pub fn deferred_paths(&self) -> usizeHow many paths the last committed pass deferred (see
defers_download).
SyncEngine::wakeups
Section titled “SyncEngine::wakeups”pub async fn wakeups(&self) -> Result<reqwest::Response, Error>No doc comment.
SyncEngine::reconcile_once
Section titled “SyncEngine::reconcile_once”pub async fn reconcile_once(&self) -> Result<usize, Error>Run one three-way sync pass with the mass-deletion guard enabled (#920). Return the number of changed actions, including platform Tag edits. Use the confirmed variant only after explicit User confirmation (DESIGN §24).
SyncEngine::reconcile_once_confirmed
Section titled “SyncEngine::reconcile_once_confirmed”pub async fn reconcile_once_confirmed(&self, allow_mass_delete: bool) -> Result<usize, Error>Reconcile baseline, local files, and remote revisions for one pass (#920).
allow_mass_delete bypasses the deletion guard only for this call; it
does not persist consent. Preserve conflicts and defer unstable paths.
Commit verified revisions, Tag baselines, and the remote cursor together
after the pass writes, then return its change count (DESIGN §24).
Source: crates/calternal-sync/src/engine.rs:31
SyncPair
Section titled “SyncPair”pub struct SyncPairNo doc comment.
Fields
pub id: Stringpub server_url: Stringpub local_folder: PathBufpub remote_folder: Stringpub include: Vec<String>pub paused: boolpub guarded: boolpub guard_reason: Option<SyncGuardReason>: The reason for a safety pause, exposed bycalternal sync status.pub allow_mass_delete_once: bool: One user-confirmed pass may exceed the deletion threshold. The daemon clears this only after that pass commits its verified journal state.
Implements: Clone, Debug, Deserialize, Serialize
SyncPair::selected
Section titled “SyncPair::selected”pub fn selected(&self, remote_path: &str) -> boolNo doc comment.
SyncPair::relative_path
Section titled “SyncPair::relative_path”pub fn relative_path<'a>(&self, remote_path: &'a str) -> Option<&'a str>No doc comment.
SyncPair::remote_path
Section titled “SyncPair::remote_path”pub fn remote_path(&self, relative: &str) -> Result<String, Error>No doc comment.
SyncPair::journal_path
Section titled “SyncPair::journal_path”pub fn journal_path(&self) -> Result<PathBuf, Error>No doc comment.
Source: crates/calternal-sync/src/config.rs:25
Action
Section titled “Action”pub enum ActionNo doc comment.
Variants
SyncedUploadDownloadConflictTrashLocalTrashRemoteRemovedOnBoth
Implements: Clone, Copy, Debug, Eq, PartialEq
Source: crates/calternal-sync/src/plan.rs:28
pub enum ErrorErrors from local journal operations. A daemon stops this pair on an error instead of treating a missing or corrupt journal as an empty baseline.
Variants
Journal(#[from] sqlx::Error)InvalidPathPendingIdentityConcurrentChangeUnsupportedPathIo(#[from] std::io::Error)Lock(#[from] std::fs::TryLockError)Watch(#[from] notify::Error)Http(#[from] reqwest::Error)UnknownWriteResultInvalidRemoteServer(u16)ServerDetails(Box<calternal_api::HttpFailure>): CLI callers opt in to complete HTTP fields; daemon status variants stay stable (#835).CursorExpiredUploadExpired: The server no longer knows this tus upload: it expired after the idle timeout or its lifetime, or a failed finalization released it. The client starts a new upload from byte 0.HashChangedRemoteListingTornRemotePreconditionFailedLocalConflictLocalDestinationChangedCredentialMassDeletionLocalRootChangedInvalidFinderTags
Implements: Debug, Error, From<SendError>
Source: crates/calternal-sync/src/lib.rs:37
SendError
Section titled “SendError”pub enum SendErrorDistinguish a failed read from a write that may already have committed.
Variants
Request(#[source] reqwest::Error)UnknownWriteResult
Implements: Debug, Error
Source: crates/calternal-sync/src/remote.rs:102
pub enum SideNo doc comment.
Variants
LocalRemote
Implements: Clone, Copy, Debug, Eq, PartialEq
Source: crates/calternal-sync/src/plan.rs:22
SyncGuardReason
Section titled “SyncGuardReason”pub enum SyncGuardReasonWhy the daemon paused a sync pair for user confirmation.
Variants
MassDeletionLocalRootChanged
Implements: Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize
Source: crates/calternal-sync/src/config.rs:19
Functions
Section titled “Functions”classify
Section titled “classify”pub fn classify( baseline: Option<&JournalEntry>, local: Option<&InventoryEntry>, remote: Option<&InventoryEntry>,) -> ActionNo doc comment.
Source: crates/calternal-sync/src/plan.rs:38
conflict_name
Section titled “conflict_name”pub fn conflict_name<Tz: TimeZone>(path: &str, device: &str, time: DateTime<Tz>) -> Stringwhere Tz::Offset: std::fmt::Display,Name the losing side of a conflict. The time is formatted in the zone of
time; the daemon passes local time so the name matches the clock the
user saw when they edited (a UTC stamp read two hours off in Berlin).
Source: crates/calternal-sync/src/plan.rs:222
deletion_guard
Section titled “deletion_guard”pub fn deletion_guard(deletions: usize, baseline_files: usize) -> boolPause before a single pass can propagate a large deletion. The relative threshold applies to the last verified pair size, never the current scan.
The 30 % rule needs more than GUARD_MIN_RELATIVE deletions: without the
floor, deleting one file of a three-file folder paused the pair, so a new
user’s first ordinary delete stopped sync. Losing every file of the pair
(an unmounted disk, rm -rf) still pauses at any size.
Source: crates/calternal-sync/src/plan.rs:169
device_name
Section titled “device_name”pub fn device_name() -> Option<String>The machine’s host name, used as the installation name at login and as
<device> in conflict copy names. $HOSTNAME is a shell variable that
is usually not exported (never under systemd), so reading it named every
device “installation”; ask the kernel instead.
Source: crates/calternal-sync/src/config.rs:119
follow_pending
Section titled “follow_pending”pub fn follow_pending<'a>( pending: &PendingUpload, current: &'a [InventoryEntry],) -> Option<&'a InventoryEntry>Follow an inode through any number of renames. A hash-only fallback is accepted only when unique, so a duplicate file cannot steal a pending upload. Re-read and hash the returned path before sending bytes.
Source: crates/calternal-sync/src/plan.rs:136
forget_server
Section titled “forget_server”pub fn forget_server(server_url: &str) -> Result<(), Error>Forget the remembered server after logout from that server.
Source: crates/calternal-sync/src/credentials.rs:171
install_download
Section titled “install_download”pub async fn install_download( root: &Path, relative: &str, expected_remote_hash: &str, expected_local_hash: Option<&str>, response: reqwest::Response,) -> Result<(), Error>Download into a new file beside the destination, verify BLAKE3, fsync, then publish by a create-if-absent atomic rename. An existing destination first moves to Trash. A concurrent new destination makes publication fail without replacing it. The daemon journals its temp pathname before opening it; recovery removes a partial temp after a crash. A standalone CLI transfer leaves an interrupted temp under its reserved name, never at the target.
The daemon uses install_download_tracked, which also returns the local
identity of the installed file.
Source: crates/calternal-sync/src/local.rs:720
load_token
Section titled “load_token”pub fn load_token(server_url: &str) -> Result<String, Error>Read the credential for one server. Agent containers may use a pre-issued
data-only CALTERNAL_TOKEN only when CALTERNAL_TOKEN_SERVER binds it to
this server, so a different --server cannot receive the bearer.
Source: crates/calternal-sync/src/credentials.rs:104
possible_rename
Section titled “possible_rename”pub fn possible_rename(old_path: &str, new_path: &str) -> boolCan a local file seen at new_path be a rename of the baseline file at
old_path? A file cannot move to a path inside itself: when the new path
is under the old one, the old file was replaced by a folder (a type flip),
and any shared identity is a reused inode, not a rename.
Source: crates/calternal-sync/src/plan.rs:126
read_http_failure
Section titled “read_http_failure”pub async fn read_http_failure(mut response: Response) -> calternal_api::HttpFailureShare one bounded failure reader between CLI actions and transfers (#835). The decoder preserves server fields and delay hints; it never replays a write.
Source: crates/calternal-sync/src/remote.rs:113
remember_server
Section titled “remember_server”pub fn remember_server(server_url: &str) -> Result<(), Error>Record the server of the last successful login. Commands without
--server use it, so calternal login <url> followed by calternal whoami works before any sync pair exists. It holds no secret.
Source: crates/calternal-sync/src/credentials.rs:155
remembered_server
Section titled “remembered_server”pub fn remembered_server() -> Result<Option<String>, Error>The server of the last successful login, if it is still logged in.
Source: crates/calternal-sync/src/credentials.rs:162
remove_token
Section titled “remove_token”pub fn remove_token(server_url: &str) -> Result<(), Error>No doc comment.
Source: crates/calternal-sync/src/credentials.rs:136
same_file_identity
Section titled “same_file_identity”pub fn same_file_identity(left: &str, right: &str) -> boolDo two local file ids (dev:ino[:birth], see local_file_id) name the
same file? Device and inode must match. The birth time must also match
when both ids have one; an id without one comes from a file system without
birth times or from a journal written before ids carried them, and then
only dev:ino can be compared.
Source: crates/calternal-sync/src/plan.rs:92
save_token
Section titled “save_token”pub fn save_token(server_url: &str, token: &str) -> Result<(), Error>No doc comment.
Source: crates/calternal-sync/src/credentials.rs:121
scan_local
Section titled “scan_local”pub fn scan_local(root: &Path) -> Result<Vec<InventoryEntry>, Error>No doc comment.
Source: crates/calternal-sync/src/local.rs:930
send_with_retry
Section titled “send_with_retry”pub async fn send_with_retry( client: &Client, request: RequestBuilder, retries: u8,) -> Result<Response, SendError>Send one HTTP request with bounded retries for safe reads only (#814, #835). A transient gateway status can follow a committed write. Until a route has a server deduplication contract, neither status nor a caller-supplied header makes replay safe, so a write reports an unknown result instead.
Source: crates/calternal-sync/src/remote.rs:35
trash_local
Section titled “trash_local”pub fn trash_local(path: &Path) -> Result<(), Error>Move a remote-deleted local file to the operating system Trash. A cross filesystem rename fails closed; the daemon must pause that pair instead of falling back to unlink or an unverified copy.