#[repr(C)]pub(super) struct ReportData<C: 'static> {
vtable: &'static ReportVtable,
children: Vec<RawReport>,
attachments: Vec<RawAttachment>,
context: C,
}Expand description
Type-erased report data structure with vtable-based dispatch.
This struct uses #[repr(C)] to enable safe field access in type-erased contexts,
allowing access to the vtable and other fields even when the concrete context type C is unknown.
Fields§
§vtable: &'static ReportVtable§children: Vec<RawReport>§attachments: Vec<RawAttachment>§context: CImplementations§
Source§impl<C: 'static> ReportData<C>
impl<C: 'static> ReportData<C>
Sourcepub(super) fn new<H: ContextHandler<C>>(
context: C,
children: Vec<RawReport>,
attachments: Vec<RawAttachment>,
) -> Self
pub(super) fn new<H: ContextHandler<C>>( context: C, children: Vec<RawReport>, attachments: Vec<RawAttachment>, ) -> Self
Creates a new ReportData with the specified handler, context, children and attachments.
This method creates the vtable for type-erased dispatch and pairs it with the report data.
Auto Trait Implementations§
impl<C> Freeze for ReportData<C>where
C: Freeze,
impl<C> RefUnwindSafe for ReportData<C>where
C: RefUnwindSafe,
impl<C> !Send for ReportData<C>
impl<C> !Sync for ReportData<C>
impl<C> Unpin for ReportData<C>where
C: Unpin,
impl<C> UnwindSafe for ReportData<C>where
C: UnwindSafe,
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