```rust use rjdebounce::Bouncer;
let mut bouncer = Bouncer::new(Duration::from_secs(1));
let result = bouncer.debounce(|| { return 5 + 5; })
asserteq!(result.issome(), true); assert_eq!(result.unwrap(), 10); ```
```rust use rjdebounce::Bouncer;
let func = || 5 + 6; let delay = Duration::from_secs(1);
let mut bouncer = Bouncer::new(delay).with_func(func);
asserteq!(bouncer.getresult().issome(), false); bouncer.execute(); asserteq!(bouncer.getresult().issome(), true); ```
Yeah absolutely. I'd love to make a bigger lib.
I mean... sure, if you want. But this is just practice for me. I do not have a licence for this and I purely wrote it to get a feel for cargo and package management. I will use this in my personal projects though. So feel free!