pub trait OptionErrorCodeExt {
// Required method
fn display_bracketed(self) -> String;
}
Expand description
Utilities for Option<ErrorCode>
.
Required Methods§
fn display_bracketed(self) -> String
Implementations on Foreign Types§
source§impl OptionErrorCodeExt for Option<ErrorCode>
impl OptionErrorCodeExt for Option<ErrorCode>
source§fn display_bracketed(self) -> String
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(), "");