storage-transfer-lib 0.2.0

Bounded S3 and local directory transfers using Apache OpenDAL
Documentation
use opendal::Metadata;

// Describes one file object queued for copying; contains no object data.
// The producer filters out directory entries before creating tasks.
#[derive(Clone, Debug)]
pub struct ObjectTask {
    // Object key relative to the source operator's directory root.
    pub path: String,
    // Metadata returned by listing, including the file size.
    pub metadata: Metadata,
}

#[derive(Clone, Copy, Debug, Default, Eq, PartialEq, serde::Serialize)]
pub struct TransferProgress {
    pub listed_objects: u64,
    /// Logical bytes delivered to copy workers, including copies that later fail.
    pub read_bytes: u64,
    // Counted after the destination writer closes successfully.
    pub copied_objects: u64,
    pub copied_bytes: u64,
}