utls-0.9.7 has been yanked.
Utils (utls)
A Rust utility library providing thread-safe progress bars and value watching functionality.
Features
-
Progress Bars: Highly customizable, thread-safe progress bars with:
- Multiple built-in styles (Classic, Modern, Minimal, Fancy, ASCII, Dots, Arrows, Box)
- Customizable appearance and behavior
- Real-time statistics tracking
- Spinner animations
- Threading support
- Formatted message templates
-
Value Watcher: Thread-safe value monitoring system
Usage Examples
Progress Bar
use PB;
use thread;
use Duration;
Value Watcher
use Watcher;
use ;
Progress Bar Styles
PB::classic()- Traditional ASCII stylePB::modern()- Unicode blocks stylePB::minimal()- Minimalistic appearancePB::fancy()- Decorative Unicode stylePB::ascii()- Pure ASCII charactersPB::dots()- Braille pattern stylePB::arrows()- Arrow-based stylePB::box_heavy()- Heavy box drawing characters
Message Formatting
Progress bars support the following template variables in messages if formatting is enabled:
{p}- Progress percentage{c}- Current value{m}- Maximum value{e}- Elapsed time{r}- Estimated remaining time (highly inaccurate)
Note: enabling formatting can decrease performance
Building
Requires Rust nightly due to #![feature(unboxed_closures)].
Examples
See the /examples directory for more usage examples: