| Crates.io | written_size |
| lib.rs | written_size |
| version | 0.1.0 |
| created_at | 2016-05-14 18:27:31.849892+00 |
| updated_at | 2016-05-14 18:27:31.849892+00 |
| description | Implementation of std::io::Write which calculates how much data is written into it. |
| homepage | |
| repository | https://github.com/kryptan/written_size |
| max_upload_size | |
| id | 5066 |
| size | 3,343 |
Implementation of std::io::Write which calculates how much data was written into it.
Add the following to your Cargo.toml:
[dependencies]
written_size = "0.1"
Api documentation can be found here.
use std::io::Write;
use written_size::WrittenSize;
let mut ws = WrittenSize::new();
ws.write(&[1, 2, 3]).unwrap();
ws.write(&[1, 2, 3]).unwrap();
assert!(ws.size() == 6);