Skip to main content

WithExitCode

Trait WithExitCode 

Source
pub trait WithExitCode: Sized {
    // Required method
    fn with_exit_code(self, code: u8) -> ExitCoded;
}
Expand description

Attach a process exit code to a diagnostic.

Required Methods§

Source

fn with_exit_code(self, code: u8) -> ExitCoded

Wrap self in an ExitCoded carrying code.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<E> WithExitCode for E
where E: Diagnostic + Send + Sync + 'static,