pub struct Error { /* private fields */ }Expand description
A generic cloneable error.
Implementations§
Source§impl Error
impl Error
Sourcepub fn new(message: impl Into<SharedString>) -> Self
pub fn new(message: impl Into<SharedString>) -> Self
Creates a new error with the given message.
Sourcepub fn with_cause(self, cause: impl Into<Self>) -> Self
pub fn with_cause(self, cause: impl Into<Self>) -> Self
Returns a copy of this error with a new cause.
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