#executable #self #destruct #seconds

this_executable_will_self_destruct

crate for "This executable will self destruct"

1 unstable release

new 0.1.0 Dec 25, 2024

#1 in #destruct

MIT license

4KB

This executable will self destruct

usage

use this_executable_will_self_destruct::ThisExecutableWillSelfDestruct;
use std::time::Duration;

fn main() {
    println!("This executable will self-destruct in five seconds");
    ThisExecutableWillSelfDestruct::new(Duration::from_secs(5)).fire();
}
$ cargo build --examples
$ ./target/debug/examples/letter
This executable will self-destruct in five seconds
$ stat ./target/debug/examples/letter
stat: cannot statx './target/debug/examples/letter': No such file or directory

No runtime deps