cairo_lang_diagnostics

Trait OptionErrorCodeExt

source
pub trait OptionErrorCodeExt {
    // Required method
    fn display_bracketed(self) -> String;
}
Expand description

Utilities for Option<ErrorCode>.

Required Methods§

Implementations on Foreign Types§

source§

impl OptionErrorCodeExt for Option<ErrorCode>

source§

fn display_bracketed(self) -> String

Format this error code in a way that is suitable for display in error message.

assert_eq!(Some(error_code!(E0001)).display_bracketed(), "[E0001]");
assert_eq!(None.display_bracketed(), "");

Implementors§