Function origin::program::at_exit

source ·
pub fn at_exit(func: Box<dyn FnOnce() + Send>)
Available on crate feature alloc only.
Expand description

Register a function to be called when exit is called.

§Safety

This arranges for func to be called, and passed obj, when the program exits.