Module report_attachments

Module report_attachments 

Source
Expand description

Collections of report attachments.

This module provides the ReportAttachments type for managing collections of attachments that can be added to reports. Attachments provide additional context or debugging information beyond the main error chain.

§Overview

The ReportAttachments type is similar to a Vec<ReportAttachment<Dynamic, T>> but provides a more convenient API for working with collections of type-erased attachments. It includes methods for:

  • Adding and removing attachments with push and pop
  • Iterating over attachments with iter
  • Converting between thread safety markers with into_local

§Examples

use rootcause::{report_attachment::ReportAttachment, report_attachments::ReportAttachments};

let mut attachments = ReportAttachments::new_sendsync();
attachments.push(ReportAttachment::new("debug info").into_dynamic());
attachments.push(ReportAttachment::new(42).into_dynamic());

assert_eq!(attachments.len(), 2);

for attachment in attachments.iter() {
    println!("Attachment type: {:?}", attachment.inner_type_id());
}

Structs§

ReportAttachments
A collection of report attachments.
ReportAttachmentsIntoIter
An iterator that consumes report attachments and yields owned values.
ReportAttachmentsIter
An iterator over references to report attachments.