pub struct ErrorReport {
pub phase: String,
pub kind: String,
pub message: String,
pub import_chain: Vec<String>,
pub call_stack: Vec<CallFrame>,
}Expand description
A structured, machine-readable error report.
This is intended for CLI/host integrations that need stable fields (instead of parsing human-readable error strings).
Fields§
§phase: String§kind: String§message: String§import_chain: Vec<String>§call_stack: Vec<CallFrame>Implementations§
Source§impl ErrorReport
impl ErrorReport
pub fn io_error(message: impl Into<String>) -> Self
pub fn parse_error(message: impl Into<String>) -> Self
pub fn to_json_value(&self) -> JsonValue
pub fn to_json_pretty(&self) -> String
Trait Implementations§
Source§impl Clone for ErrorReport
impl Clone for ErrorReport
Source§fn clone(&self) -> ErrorReport
fn clone(&self) -> ErrorReport
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 ErrorReport
impl Debug for ErrorReport
Source§impl PartialEq for ErrorReport
impl PartialEq for ErrorReport
impl StructuralPartialEq for ErrorReport
Auto Trait Implementations§
impl Freeze for ErrorReport
impl RefUnwindSafe for ErrorReport
impl Send for ErrorReport
impl Sync for ErrorReport
impl Unpin for ErrorReport
impl UnwindSafe for ErrorReport
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