pub struct SerializableError {
pub context: SharedString,
pub cause: Option<Arc<SerializableError>>,
}Expand description
An error stack with all messages flattened into strings, trivial to (de)serialize
Fields§
§context: SharedString§cause: Option<Arc<SerializableError>>Implementations§
Source§impl SerializableError
impl SerializableError
Sourcepub fn from_anyhow(err: &Error) -> Self
Available on crate feature anyhow only.
pub fn from_anyhow(err: &Error) -> Self
anyhow only.Convert an anyhow::Error into a SerializableError
Trait Implementations§
Source§impl Clone for SerializableError
impl Clone for SerializableError
Source§fn clone(&self) -> SerializableError
fn clone(&self) -> SerializableError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SerializableError
impl Debug for SerializableError
Source§impl<'de> Deserialize<'de> for SerializableError
impl<'de> Deserialize<'de> for SerializableError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SerializableError
impl Display for SerializableError
Source§impl Error for SerializableError
impl Error for SerializableError
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 Freeze for SerializableError
impl RefUnwindSafe for SerializableError
impl Send for SerializableError
impl Sync for SerializableError
impl Unpin for SerializableError
impl UnwindSafe for SerializableError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ErrContext for T
impl<T> ErrContext for T
Source§fn context<M>(self, msg: M) -> ErrorContextwhere
M: Into<SharedString>,
fn context<M>(self, msg: M) -> ErrorContextwhere
M: Into<SharedString>,
Wrap this error into a new
ErrorContext error, annotated with the specified contextSource§impl<T> IntoErrorIterator for Twhere
T: Error + 'static,
impl<T> IntoErrorIterator for Twhere
T: Error + 'static,
Source§fn error_chain(&self) -> ErrorIterator<'_> ⓘ
fn error_chain(&self) -> ErrorIterator<'_> ⓘ
Creates an iterator over
Error::sourcesSource§fn serializable_copy(&self) -> SerializableError
fn serializable_copy(&self) -> SerializableError
Copies and flattens the error stack into a
SerializableError