pub struct Error<Kind> {
pub context: &'static str,
pub kind: Kind,
}
Fields§
§context: &'static str
§kind: Kind
Implementations§
Source§impl<Kind> Error<Kind>
impl<Kind> Error<Kind>
pub fn new(context: &'static str, kind: Kind) -> Self
pub fn with_source<E>(self, source: E) -> Selfwhere
E: Source,
pub fn into_other_kind<OtherKind>(self) -> Error<OtherKind>where
Kind: Into<OtherKind>,
pub fn kind(&self) -> &Kind
pub fn report(&self) -> ErrorReport<'_, Kind>
Trait Implementations§
Auto Trait Implementations§
impl<Kind> Freeze for Error<Kind>where
Kind: Freeze,
impl<Kind> RefUnwindSafe for Error<Kind>where
Kind: RefUnwindSafe,
impl<Kind> Send for Error<Kind>where
Kind: Send,
impl<Kind> Sync for Error<Kind>where
Kind: Sync,
impl<Kind> Unpin for Error<Kind>where
Kind: Unpin,
impl<Kind> UnwindSafe for Error<Kind>where
Kind: 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