pub trait LeoMessageCode: Sized {
    fn exit_code(&self) -> i32;
    fn error_code(&self) -> String;
    fn warning_code(&self) -> String;
    fn code_mask() -> i32;
    fn message_type() -> String;
    fn is_error() -> bool;

    fn code_identifier() -> i8 { ... }
}
Expand description

MessageCode trait that all Errors should implement.

Required Methods§

Returns the error’s exit code for the program.

Returns the prefixed error identifier.

Returns the prefixed warning identifier.

Returns the messages’s exit code mask, as to avoid conflicts.

Returns the message’s code type for the program.

Returns if the message is an error or warning.

Provided Methods§

The LeoErrorCode which has a default code identifier of 037 (Leo upsidedown and backwards). This is to make the exit codes unique to Leo itself.

Implementors§

Implements the trait for LeoError Codes.

Implements the trait for LeoError Codes.

Implements the trait for LeoError Codes.

Implements the trait for LeoError Codes.

Implements the trait for LeoError Codes.

Implements the trait for LeoError Codes.

Implements the trait for LeoError Codes.

Implements the trait for LeoError Codes.

Implements the trait for LeoError Codes.