Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions crates/tracel-artifact/src/transfer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ mod ranged;
/// Watches a transfer as it runs, and can stop it.
///
/// Every method defaults to doing nothing, so an implementation only has to define the events it
/// cares about. Callbacks run on the transferring thread and block it, so an implementation that
/// does real work should hand it off.
/// cares about. Callbacks run on the thread that started the transfer and block it, so an
/// implementation that does real work should hand it off. An upload sends several parts at once,
/// so it can report on more than one file at a time; each call names its file.
pub trait TransferObserver {
/// Returns whether the active transfer should stop.
///
Expand All @@ -55,8 +56,8 @@ pub trait TransferObserver {
let _ = (rel_path, total_bytes);
}

/// Bytes have moved for the file being transferred. `transferred_bytes` is the running total
/// for that file, not an increment.
/// Bytes have moved for the file `rel_path`. `transferred_bytes` is the running total for that
/// file, not an increment.
fn file_progress(&mut self, rel_path: &str, transferred_bytes: u64) {
let _ = (rel_path, transferred_bytes);
}
Expand Down
Loading
Loading