rootcause_internals/attachment/mod.rs
1//! Type-erased attachment data structures.
2//!
3//! This module implements type erasure for error report attachments through
4//! vtable-based dispatch. The design allows attachments of any type `A` to be
5//! stored uniformly while maintaining the ability to format and inspect them.
6//!
7//! # Structure
8//!
9//! - [`data`]: Contains [`AttachmentData<A>`], the `#[repr(C)]` wrapper that
10//! pairs an attachment value with its vtable
11//! - [`raw`]: Contains [`RawAttachment`] and [`RawAttachmentRef`], the
12//! type-erased pointer types that users of this module interact with
13//! - [`vtable`]: Contains [`AttachmentVtable`], the function pointer table for
14//! type-erased operations
15//!
16//! [`AttachmentData<A>`]: data::AttachmentData
17//! [`AttachmentVtable`]: vtable::AttachmentVtable
18
19pub(crate) mod data;
20pub(crate) mod raw;
21pub(crate) mod vtable;
22
23pub use self::raw::{RawAttachment, RawAttachmentRef};