{"id":23318468,"url":"https://github.com/mcb2003/transfer-progress-rs","last_synced_at":"2025-04-07T05:18:27.069Z","repository":{"id":57670524,"uuid":"397900075","full_name":"mcb2003/transfer-progress-rs","owner":"mcb2003","description":"Rust crate to easily monitor the transfer of bytes from a reader to a writer","archived":false,"fork":false,"pushed_at":"2021-10-07T15:57:08.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T08:23:02.075Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcb2003.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-19T10:13:38.000Z","updated_at":"2021-10-07T15:57:12.000Z","dependencies_parsed_at":"2022-09-26T20:41:08.241Z","dependency_job_id":null,"html_url":"https://github.com/mcb2003/transfer-progress-rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcb2003%2Ftransfer-progress-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcb2003%2Ftransfer-progress-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcb2003%2Ftransfer-progress-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcb2003%2Ftransfer-progress-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcb2003","download_url":"https://codeload.github.com/mcb2003/transfer-progress-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595335,"owners_count":20963943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-20T17:17:08.108Z","updated_at":"2025-04-07T05:18:27.044Z","avatar_url":"https://github.com/mcb2003.png","language":"Rust","readme":"# Transfer Progress\n\nA small rust crate that allows you to monitor the speed, progress and estimated\ncompletion time of a transfer between a reader and a writer.\n\nInternally, this spins up a new thread for each transfer, and uses the\n[progress-streams crate][progress-streams] to monitor it.\n\n[progress-streams]: \u003chttps://crates.io/crates/progress-streams\u003e\n\n# Example\n\n```rust\nuse std::{\n    fs::File,\n    io::{self, Read},\n};\n\nuse transfer_progress::Transfer;\n\nfn main() -\u003e io::Result\u003c()\u003e {\n    let reader = File::open(\"/dev/urandom\")?.take(1024 * 1024 * 1024); // 1 GiB\n    let writer = io::sink();\n\n    // Create the transfer monitor\n    let transfer = Transfer::new(reader, writer);\n\n    while !transfer.is_complete() {\n        std::thread::sleep(std::time::Duration::from_secs(1));\n        // {:#} makes Transfer use SI units (MiB instead of MB)\n        println!(\"{:#}\", transfer);\n    }\n\n    // Catch any errors and retrieve the reader and writer\n    let (_reader, _writer) = transfer.finish()?;\n    Ok(())\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcb2003%2Ftransfer-progress-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcb2003%2Ftransfer-progress-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcb2003%2Ftransfer-progress-rs/lists"}