Macro spanquist::spanquist [] [src]

macro_rules! spanquist {
    (fn main() $body: block) => { ... };
}

Randomly schedule self-termination of application.

spanquist! is used by wrapping the fn main() {} of the target application. Random termination delay is determined upon start. Use of spanquist! is transparent to the application and can not be controlled at runtime.

Upon termination the message NOBODY EXPECTS THE SPANISH INQUISITION! is printed to stderr. The delay for termination is currently limited to an hour but could be changed in future releases so as to keep you on your toes.

#[macro_use] extern crate spanquist;
use std::time;
use std::thread;

spanquist! {
fn main() {
    loop {
        println!("Hello, world!");
        thread::sleep(time::Duration::from_millis(1000));
    }
}}

Any resulting hilarity, chaos or straight out murder is your sole responsibility.