[][src]Function quit::with_code

pub fn with_code(exit_code: i32) -> !

Cleanly exits the program with an exit code.

Calling this function from within an FFI boundary invokes undefined behavior. Because panics are used internally to unwind the stack, the exit code cannot be passed safely. exit should be used instead in that case.

Examples

fn exit() -> ! {
    quit::with_code(1);
}