pub trait PreformatReportExt {
// Required method
fn preformat(&self) -> Report<PreformattedContext, Mutable, SendSync>;
}Expand description
Required Methods§
Sourcefn preformat(&self) -> Report<PreformattedContext, Mutable, SendSync>
fn preformat(&self) -> Report<PreformattedContext, Mutable, SendSync>
Creates a new report, which has the same structure as the current report, but has all the contexts and attachments preformatted.
This can be useful, as the new report is mutable because it was just
created, and additionally the new report is Send+Sync.
§Examples
let report_mut: ReportMut<'_, NonSendSyncError, markers::Local> = report.as_mut();
let preformatted: Report<PreformattedContext, markers::Mutable, markers::SendSync> =
report_mut.preformat();
assert_eq!(format!("{report}"), format!("{preformatted}"));Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".