pub struct ErrorMessageFormatter;Expand description
User-friendly error message formatter
Implementations§
Source§impl ErrorMessageFormatter
impl ErrorMessageFormatter
Sourcepub fn format_for_user(error: &Error) -> String
pub fn format_for_user(error: &Error) -> String
Formats an error for user display
Sourcepub fn format_with_context(error: &Error, context: &ErrorContext) -> String
pub fn format_with_context(error: &Error, context: &ErrorContext) -> String
Formats an error with context for user display
Sourcepub fn format_for_logging(
error: &Error,
context: Option<&ErrorContext>,
) -> String
pub fn format_for_logging( error: &Error, context: Option<&ErrorContext>, ) -> String
Formats an error for logging
Auto Trait Implementations§
impl Freeze for ErrorMessageFormatter
impl RefUnwindSafe for ErrorMessageFormatter
impl Send for ErrorMessageFormatter
impl Sync for ErrorMessageFormatter
impl Unpin for ErrorMessageFormatter
impl UnwindSafe for ErrorMessageFormatter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more