1 unstable release
Uses old Rust 2015
0.1.0 | May 11, 2016 |
---|
#4 in #showing
7KB
71 lines
progressive
A rust library for showing progress of iterators and loops.
Documentation
To create the documentation run:
cargo doc
Usage
To use progressive
, add this to your Cargo.toml
:
[dependencies]
progressive = "0.1"
And this to your crate root:
extern crate progressive;
Here's a simple example that shows how to wrap an iterator tin order to get progress information:
extern crate progressive;
use progressive::progress;
use std::time::Duration;
fn main() {
for _ in progress(0..30) {
// do something expensive here
std::thread::sleep(Duration::from_millis(200));
}
}
For an example run cargo run --example basic
lib.rs
:
Lets you wrap an iterator and show progress while running it.
extern crate progressive;
use progressive::progress;
use std::time::Duration;
fn main() {
// wrap the range in progress() to see progress information
for _ in progress(0..10) {
// do something expensive here
std::thread::sleep(Duration::from_millis(500));
}
}
Dependencies
~41KB