Target src/main.rs::main()? I'm basically wondering what the optimal method for returning to the top of src/main.rs::main() is?  

Maybe something like this:

mod main;

pub fn main() {
    crate::main();
}


Or maybe there's a keyword built in?

I want to handle certain kinds of errors by 'restarting the program'.
There is a lot of way, I advice the simple one, use a loop:

enum Error {
    A,
}

fn run() -&gt; Result&lt;(), Error&gt; {
    if rand::random() {
        Ok(())
    } else {
        Err(Error::A)
    }
}

pub fn main() {
    while let Err(_) = run() {
        println!("Hello");
    }
}


However, be sure the program end maybe add a maximum fail counter.