transition 0.1.2

Allows to visualize the execution and result of code using LED light blink(1)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::error::Error;
use std::thread;
use std::time::Duration;
use transition::{Led, Transition};

fn main() -> Result<(), Box<dyn Error>> {
    let notification = Transition::new(&[Led::Cyan, Led::Blank, Led::Orange, Led::Blank])?
        .on_success(&Led::Red)
        .on_failure(&Led::Green)
        .start()?;
    thread::sleep(Duration::from_secs(5));
    notification.notify_success()?;

    Ok(())
}