written_size

Crates.iowritten_size
lib.rswritten_size
version0.1.0
sourcesrc
created_at2016-05-14 18:27:31.849892
updated_at2016-05-14 18:27:31.849892
descriptionImplementation of std::io::Write which calculates how much data is written into it.
homepage
repositoryhttps://github.com/kryptan/written_size
max_upload_size
id5066
size3,343
(kryptan)

documentation

https://kryptan.github.io/written_size/target/doc/written_size/index.html

README

Written Size

Implementation of std::io::Write which calculates how much data was written into it.

Installation

Add the following to your Cargo.toml:

[dependencies]
written_size = "0.1"

API docs

Api documentation can be found here.

Example

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);
Commit count: 7

cargo fmt