pub struct TransferResult {
pub bytes_transferred: u64,
pub duration_ms: u64,
pub mtime_preserved: bool,
pub durable: bool,
}Expand description
Result of an SCP file transfer operation.
Fields§
§bytes_transferred: u64Number of bytes transferred.
duration_ms: u64Total duration in milliseconds.
mtime_preserved: boolWhether the remote modification time was applied to the local file.
G-SCP-R01: the product documented mtime preservation as a guarantee while the implementation discarded the failure at two nesting levels. Destination filesystems that cannot represent the operation — FAT32, exFAT, some bind mounts, WSL interop paths — silently produced a file with the wrong timestamp, and a build pipeline deciding whether to recompile by mtime comparison took the wrong branch with the symptom appearing far from the cause. Reporting the outcome resolves the contradiction without failing transfers that are otherwise complete and correct.
Always true for uploads and whenever the remote sent no timestamps: there was
nothing to preserve, so nothing was lost.
durable: boolWhether the parent directory was successfully fsynced after the atomic rename.
G-SCP-R02: the rename is atomic, but until the directory entry is flushed a crash can leave the file missing even though the CLI already reported exit 0. The fsync was best-effort by design and invisible by accident; an agent had no way to know whether the success it received was durable.
Trait Implementations§
Source§impl Clone for TransferResult
impl Clone for TransferResult
Source§fn clone(&self) -> TransferResult
fn clone(&self) -> TransferResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more