Skip to main content

ExitHandler

Trait ExitHandler 

Source
pub trait ExitHandler:
    Send
    + Sync
    + Debug {
    // Required method
    fn exit(&self, code: i32);
}
Expand description

Abstraction for process exit, allowing tests to observe exit requests without actually terminating the process.

Required Methods§

Source

fn exit(&self, code: i32)

Terminates the process (or records the request in test mode).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§