pub struct SanitizedError<E> { /* private fields */ }Expand description
Sanitized error wrapper
Implementations§
Source§impl<E> SanitizedError<E>
impl<E> SanitizedError<E>
Sourcepub fn new(error: E, mode: DisplayMode) -> Self
pub fn new(error: E, mode: DisplayMode) -> Self
Create a new sanitized error
Sourcepub fn production(error: E) -> Self
pub fn production(error: E) -> Self
Create a production-mode sanitized error
Sourcepub fn development(error: E) -> Self
pub fn development(error: E) -> Self
Create a development-mode sanitized error (no sanitization)
Sourcepub fn into_inner(self) -> E
pub fn into_inner(self) -> E
Get the inner error
Trait Implementations§
Source§impl<E: Debug> Debug for SanitizedError<E>
impl<E: Debug> Debug for SanitizedError<E>
Source§impl<E: Display> Display for SanitizedError<E>
impl<E: Display> Display for SanitizedError<E>
Source§impl<E: Error> Error for SanitizedError<E>
impl<E: Error> Error for SanitizedError<E>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl<E> Freeze for SanitizedError<E>where
E: Freeze,
impl<E> RefUnwindSafe for SanitizedError<E>where
E: RefUnwindSafe,
impl<E> Send for SanitizedError<E>where
E: Send,
impl<E> Sync for SanitizedError<E>where
E: Sync,
impl<E> Unpin for SanitizedError<E>where
E: Unpin,
impl<E> UnwindSafe for SanitizedError<E>where
E: UnwindSafe,
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