Record ErrorReportpub
Source:record(pub) ErrorReport
.message Str
.cause (Option ErrorReport)
.backtrace (Vec Str)
Description
ErrorReport wraps a message string, an optional wrapped cause (the next layer of the error chain), and an optional backtrace represented as a (Vec Str) of pre-rendered frame descriptions. The record is value-typed; every modifier returns a fresh copy.
Spec shape uses Error (existential) + (Option (Seq Frame _)); this partial uses Str + (Vec Str) pending the Error trait and Frame types.
Fields
.messageStr.causeOption(ErrorReport).backtraceVec(Str)
Implementations
impl ErrorReport
.message ( ErrorReport → Str )
.message ( ErrorReport → Str )
Accessor: return the top-level message. Equivalent to the .message record-field accessor, provided as an explicit method so callers can treat the type as opaque.
.pretty ( ErrorReport → Str )
.pretty ( ErrorReport → Str )
Render a multi-line pretty-printed representation of the error chain. The top-level message appears on its own line; each wrapped cause is emitted on a subsequent line prefixed with "caused by: ". When a non-empty backtrace is attached, it is appended after the chain, one frame per line, prefixed with " at ".