#utilities #tasks #solution #programming #set #perform #applications

bin+lib tija_tools

tija_tools is a Rust library providing a set of utilities designed to perform common tasks in Rust programming. This library is open for use and can be utilized in various applications, offering simple and effective solutions.

2 releases

0.1.4 May 8, 2024
0.1.3 May 6, 2024
0.1.2 May 6, 2024
0.1.1 May 6, 2024
0.1.0 May 6, 2024

#20 in #perform

Download history 4/week @ 2024-07-29 3/week @ 2024-09-30

152 downloads per month

MIT license

7KB
105 lines

tija_tools

tija_tools is a Rust library providing a set of utilities designed to perform common tasks in Rust programming. This library is open for use and can be utilized in various applications, offering simple and effective solutions.

Installation

[dependencies]

tija_tools = "0.1.0"

##ussage

use tija_tools::terminal::{ProgressRing, AnimationMode};
use tokio::time::Duration;

async fn my_task() {
    tokio::time::sleep(Duration::from_secs(10)).await;
}

#[tokio::main]
async fn main() {

    let args: Vec<String> = std::env::args().collect();

    if args.contains(&"test".to_string())
    {
        let mut ring = ProgressRing::new(100, 10, Some(vec!["1","2","3","4","3","2"]), Some('s'));

        ProgressRing::run_with_animation(&mut ring, AnimationMode::Rotate, my_task()).await;
        ProgressRing::run_with_animation(&mut ring, AnimationMode::Bounce, my_task()).await;
        ProgressRing::run_with_animation(&mut ring, AnimationMode::Bounce2, my_task()).await;
        ProgressRing::run_with_animation(&mut ring, AnimationMode::Loading, my_task()).await;
    }
}

Dependencies

~2.8–8.5MB
~67K SLoC