Skip to main content
← dvs documentation Rust API reference

Module operation

Module operation 

Source
Expand description

Operation context (observer hooks, cancel flag), counts, byte totals and timing helpers.

Structs§

ByteTotals
Byte totals for an add or get result: to_transfer + already_stored == total; transferred is what actually moved. Rows of unknown size count in none.
CancelToken
A shared “stop starting new files” flag. Cloning shares the flag, so a signal handler can hold one clone while the operation checks another.
Counts
Row counts for a result: succeeded + failed + cancelled == total.
OperationContext
Passed to every operation: who, if anyone, observes it, and its cancel flag.
OperationPlan
What an operation is about to do, known once selection and storage checks are done. status reports zero *_to_transfer.
TransferObserver
Adapts an on_file_start callback (the pre-observer progress API) into an observer that only watches transfers.

Enums§

FileRow
A file’s final row, in the same shape the command’s result will hold.
RowState
How one file of an add or status run ended.
RunOutcome
How an add or status run ended.

Traits§

OperationObserver
Hooks an operation calls as it runs. Called from worker threads, possibly concurrently; implementations serialize their own output.
OperationRow
A result row that can be counted into Counts.

Functions§

duration_ms
millis
rfc3339_ms
RFC 3339 UTC with milliseconds, e.g. 2025-10-21T14:30:00.123Z.
unix_ms
Unix milliseconds, for event ts.