pub struct ErrorSnapshot {
pub reason: String,
pub detail: Option<String>,
pub position: Option<String>,
pub want: Option<String>,
pub path: Option<String>,
pub context: Vec<SnapshotContextFrame>,
pub root_metadata: ErrorMetadata,
pub source_frames: Vec<SnapshotSourceFrame>,
}Expand description
Stable machine-readable snapshot view derived from StructError.
This object is intentionally separate from runtime propagation semantics.
It carries exported diagnostic data, but does not implement StdError
or own any runtime source object handles.
Fields§
§reason: String§detail: Option<String>§position: Option<String>§want: Option<String>§path: Option<String>§context: Vec<SnapshotContextFrame>§root_metadata: ErrorMetadata§source_frames: Vec<SnapshotSourceFrame>Implementations§
Source§impl ErrorSnapshot
impl ErrorSnapshot
pub fn stable_context(&self) -> &[SnapshotContextFrame]
pub fn stable_source_frames(&self) -> &[SnapshotSourceFrame]
pub fn root_source_frame(&self) -> Option<&SnapshotSourceFrame>
pub fn stable_export(&self) -> StableErrorSnapshot
pub fn into_stable_export(self) -> StableErrorSnapshot
pub fn report(&self) -> DiagnosticReport
pub fn into_report(self) -> DiagnosticReport
Trait Implementations§
Source§impl Clone for ErrorSnapshot
impl Clone for ErrorSnapshot
Source§fn clone(&self) -> ErrorSnapshot
fn clone(&self) -> ErrorSnapshot
Returns a duplicate 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 ErrorSnapshot
impl Debug for ErrorSnapshot
Source§impl From<&ErrorSnapshot> for DiagnosticReport
impl From<&ErrorSnapshot> for DiagnosticReport
Source§fn from(value: &ErrorSnapshot) -> Self
fn from(value: &ErrorSnapshot) -> Self
Converts to this type from the input type.
Source§impl From<&ErrorSnapshot> for StableErrorSnapshot
impl From<&ErrorSnapshot> for StableErrorSnapshot
Source§fn from(value: &ErrorSnapshot) -> Self
fn from(value: &ErrorSnapshot) -> Self
Converts to this type from the input type.
Source§impl<T: DomainReason> From<&StructError<T>> for ErrorSnapshot
impl<T: DomainReason> From<&StructError<T>> for ErrorSnapshot
Source§fn from(value: &StructError<T>) -> Self
fn from(value: &StructError<T>) -> Self
Converts to this type from the input type.
Source§impl From<ErrorSnapshot> for DiagnosticReport
impl From<ErrorSnapshot> for DiagnosticReport
Source§fn from(value: ErrorSnapshot) -> Self
fn from(value: ErrorSnapshot) -> Self
Converts to this type from the input type.
Source§impl From<ErrorSnapshot> for StableErrorSnapshot
impl From<ErrorSnapshot> for StableErrorSnapshot
Source§fn from(value: ErrorSnapshot) -> Self
fn from(value: ErrorSnapshot) -> Self
Converts to this type from the input type.
Source§impl<T: DomainReason> From<StructError<T>> for ErrorSnapshot
impl<T: DomainReason> From<StructError<T>> for ErrorSnapshot
Source§fn from(value: StructError<T>) -> Self
fn from(value: StructError<T>) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ErrorSnapshot
impl PartialEq for ErrorSnapshot
impl StructuralPartialEq for ErrorSnapshot
Auto Trait Implementations§
impl Freeze for ErrorSnapshot
impl RefUnwindSafe for ErrorSnapshot
impl Send for ErrorSnapshot
impl Sync for ErrorSnapshot
impl Unpin for ErrorSnapshot
impl UnsafeUnpin for ErrorSnapshot
impl UnwindSafe for ErrorSnapshot
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