Skip to main content

CunoError

Trait CunoError 

Source
pub trait CunoError: Error {
    // Required method
    fn exit_class(&self) -> ExitClass;

    // Provided method
    fn help(&self) -> Option<String> { ... }
}
Expand description

An error any cuno crate can return to cuno-cli, which reports it in one place, error: <Display> then help: <help> when there is one, and returns ExitClass::code for the binary to exit with (crates/cuno-cli/src/lib.rs, report).

Required Methods§

Source

fn exit_class(&self) -> ExitClass

Which exit code this error leads to.

Provided Methods§

Source

fn help(&self) -> Option<String>

How to fix the problem, shown on a help: line.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§