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§