pub struct Error { /* private fields */ }
Implementations§
Source§impl Error
impl Error
pub fn new<M: Into<Cow<'static, str>>>(message: M) -> Self
Sourcepub fn with_suppressed<S: IntoIterator<Item = Error>>(
self,
suppressed: S,
) -> Error
pub fn with_suppressed<S: IntoIterator<Item = Error>>( self, suppressed: S, ) -> Error
Set the position for this error.
Sourcepub fn display(&self) -> Display<'_>
pub fn display(&self) -> Display<'_>
Convert errro into a type that is fmt::Display
.
WARNING: drops error information. Only use if absolutely necessary!
Sourcepub fn suppressed(&self) -> Vec<&Error>
pub fn suppressed(&self) -> Vec<&Error>
Get all suppressed errors.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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