Skip to main content
← dvs documentation Rust API reference

Crate dvs

Crate dvs 

Source

Re-exports§

pub use backends::Backend;
pub use backends::RetrieveRequest;
pub use backends::StoreRequest;
pub use backends::StoreResult;
pub use config::Compression;
pub use error::Error;
pub use error::ErrorCode;
pub use error::backend_error_code;
pub use operation::ByteTotals;
pub use operation::CancelToken;
pub use operation::Counts;
pub use operation::FileRow;
pub use operation::OperationContext;
pub use operation::OperationObserver;
pub use operation::OperationPlan;
pub use operation::OperationRow;
pub use operation::RowState;
pub use operation::RunOutcome;
pub use operation::TransferObserver;
pub use paths::AddPathStatus;
pub use paths::DvsPaths;
pub use paths::PathFilter;
pub use paths::ProjectPath;
pub use paths::find_repo_root;
pub use progress::FileProgress;

Modules§

audit
auth
Auth for dvs-server
backends
config
error
Stable, machine-readable codes for failures, shared by every command.
git
globbing
init
operation
Operation context (observer hooks, cancel flag), counts, byte totals and timing helpers.
paths
progress

Structs§

AddReport
The rows of an add, sorted by path, plus counts, outcome and byte totals.
AddResult
Result of adding a single file.
Baseline
FileMetadata
The dvs metadata for a given file
GetCounts
total is every row; succeeded the rows at their target (restored, replaced, unchanged, would_restore, would_replace); failed the failed action.
GetOptions
GetReport
The whole result of a get: operation information plus one row per file.
GetRow
One requested file. Every field is always present (null when not applicable) so JSON and R consumers get a fixed schema.
Hashes
StatusFacts
StatusReport
The rows of a status run, sorted by path.
WorkingCopy

Enums§

Action
What get did (or, in a dry run, would do) with a requested file.
AddDetail
Before
The state of a requested file before get touches it.
GetCode
Why a file did not end up at its target: a get-specific code, or a shared one. Serialized as the code’s string either way.
GetOutcome
GetVerdict
How a get ended, for exit codes and R’s on_error.
HashAlg
Outcome
Outcome of an add or get operation.
Status
StoredCopy
Whether the configured storage appears to hold the working file’s bytes. Existence only: it does not prove the stored copy is intact.

Constants§

VERSION

Functions§

add_files
Adds files matching a glob pattern to DVS.
format_size
Formats a byte count into a human-readable string (e.g. “10.5 MB”). Uses base-1024 divisors to match ls -h / du -h output.
get_files
Gets the selected files from storage, following options.on_conflict.
inspect_status
Inspect tracked files in parallel. Each row goes to ctx’s observer as soon as it completes, so callers can stream rows; the returned rows are sorted by path. Hashing is reported only once a file is actually hashed. Once ctx is cancelled, files not yet started get a cancelled row, and a run that fails after a cancel still returns its (empty) cancelled report.
set_num_threads
Set the number of threads for DVS parallel operations. Pass 0 to clear (revert to environment variable / automatic detection).
shell_path
Quote a path for a shell command line when it needs it.