项目作者: haze

项目描述 :
pretty print lines with loading feedback
高级语言: Rust
项目地址: git://github.com/haze/poindexter.git
创建时间: 2019-07-29T23:21:38Z
项目社区:https://github.com/haze/poindexter

开源协议:MIT License

下载


Poindexter

poindexter is a rust library for printing output while also signaling intended work wait times

Demo

Installation

Add this to your cargo.toml

poindexter = "0.0.1"

Usage

  1. use poindexter::PrintWorker;
  2. use std::{thread, time};
  3. fn main() -> Result<(), std::io::Error> {
  4. let w = PrintWorker::default();
  5. w.println("this is a test string")?;
  6. thread::sleep(time::Duration::from_secs(5));
  7. w.println(format!("allocated strings work as well"))?;
  8. thread::sleep(time::Duration::from_secs(5));
  9. w.println("done")
  10. }

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT