pub struct SimpleErrorReport<'a> {
pub error_report: &'a ErrorReport,
}Expand description
Simple implementation of SubmitErrorReport.
Generates a structured, markdown-formatted error report suitable for both humans and AI/LLMs. Does not generate URLs — the report is the output.
Respects the NO_COLOR environment variable: when set, terminal hyperlinks
are disabled, producing clean plain text (markdown is unaffected).
§Example
use charon_error::prelude::*;
use charon_error::prelude::simple_er::*;
SimpleERGlobalSettings::set_global_settings(SimpleERGlobalSettings {}).unwrap_error();Example Output:
PANIC: A panic occurred during execution.
* Message: 'Error: `Called `ResultExt::unwrap_error()` on an `Err` value`'
* Path: 'src/main.rs:72:21'
PANIC: The application encountered an error it could not recover from.
{
last_error: 'Error: `Called `ResultExt::unwrap_error()` on an `Err` value`',
unique_id: '4qYnZ5u3pWAHdVZJEQB0',
frames: [
{
message: 'No such file or directory (os error 2)',
source_location: src/cli/config.rs:15:10,
span_trace: [
charon_demo::cli::config::read_config at (src/cli/config.rs:7:0),
charon_demo::cli::start_server at (src/cli.rs:82:0),
charon_demo::cli::start at (src/cli.rs:35:0),
],
attachments: {},
date_time: 2026-02-28T23:56:31.182899732+00:00,
},
{
message: 'The config file failed to load correctly.',
source_location: src/cli/config.rs:15:10,
span_trace: [
charon_demo::cli::config::read_config at (src/cli/config.rs:7:0),
charon_demo::cli::start_server at (src/cli.rs:82:0),
charon_demo::cli::start at (src/cli.rs:35:0),
],
attachments: {
file_path: '../config.toml',
},
date_time: 2026-02-28T23:56:31.183006561+00:00,
},
{
message: 'Error: `Called `ResultExt::unwrap_error()` on an `Err` value`',
source_location: src/main.rs:72:21,
span_trace: [],
attachments: {},
date_time: 2026-02-28T23:56:31.183038050+00:00,
},
],
}
No report link available.Fields§
§error_report: &'a ErrorReportReference to the error report being formatted.
Trait Implementations§
Source§impl<'a> Clone for SimpleErrorReport<'a>
impl<'a> Clone for SimpleErrorReport<'a>
Source§fn clone(&self) -> SimpleErrorReport<'a>
fn clone(&self) -> SimpleErrorReport<'a>
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<'a> Debug for SimpleErrorReport<'a>
impl<'a> Debug for SimpleErrorReport<'a>
Source§impl<'a> SubmitErrorReport<'a> for SimpleErrorReport<'a>
impl<'a> SubmitErrorReport<'a> for SimpleErrorReport<'a>
Source§fn new(error: &'a ErrorReport) -> Self
fn new(error: &'a ErrorReport) -> Self
Create a new report wrapper from an error report reference.
Source§fn get_error_report(&self) -> &ErrorReport
fn get_error_report(&self) -> &ErrorReport
Return the
ErrorReport containing the error stack.Source§fn create_message(&self) -> Result<String, ErrorReport>
fn create_message(&self) -> Result<String, ErrorReport>
Create the full user-facing error message with report instructions.
Source§fn create_bug_report(&self) -> Result<String, ErrorReport>
fn create_bug_report(&self) -> Result<String, ErrorReport>
Create the bug report body text (same content as the URL submission).
Source§fn create_submit_url(&self) -> Result<Url, ErrorReport>
fn create_submit_url(&self) -> Result<Url, ErrorReport>
Create a URL that opens a pre-filled issue on the platform.
Source§fn create_submit_url_limited(
&self,
_max_length: usize,
) -> Result<Url, ErrorReport>
fn create_submit_url_limited( &self, _max_length: usize, ) -> Result<Url, ErrorReport>
Create a pre-filled issue URL, progressively removing detail to stay under
max_length.Source§fn check_existing_reports(&self) -> Result<Url, ErrorReport>
fn check_existing_reports(&self) -> Result<Url, ErrorReport>
Create a URL to search for existing reports with the same title.
Source§fn validate_settings(&self) -> Result<(), ErrorReport>
fn validate_settings(&self) -> Result<(), ErrorReport>
Validate that required global settings have been configured. Read more
Auto Trait Implementations§
impl<'a> Freeze for SimpleErrorReport<'a>
impl<'a> !RefUnwindSafe for SimpleErrorReport<'a>
impl<'a> Send for SimpleErrorReport<'a>
impl<'a> Sync for SimpleErrorReport<'a>
impl<'a> Unpin for SimpleErrorReport<'a>
impl<'a> UnsafeUnpin for SimpleErrorReport<'a>
impl<'a> !UnwindSafe for SimpleErrorReport<'a>
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