It seems none of the default hooks/contructors ever pass down an AttachmentParent meaning that the AttachmentFormatterHook is (by default) unable to access the parent report.
|
pub fn format_inner(self) -> impl core::fmt::Display + core::fmt::Debug { |
|
format_helper( |
|
self.into_dynamic(), |
|
|attachment, formatter| { |
|
crate::hooks::attachment_formatter::display_attachment(attachment, None, formatter) |
|
}, |
|
|attachment, formatter| { |
|
crate::hooks::attachment_formatter::debug_attachment(attachment, None, formatter) |
|
}, |
|
) |
|
} |
|
impl<'a, A: ?Sized> core::fmt::Display for ReportAttachmentRef<'a, A> { |
|
fn fmt(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { |
|
let report: ReportAttachmentRef<'_, Dynamic> = self.into_dynamic(); |
|
crate::hooks::attachment_formatter::display_attachment(report, None, formatter) |
|
} |
|
} |
|
|
|
impl<'a, A: ?Sized> core::fmt::Debug for ReportAttachmentRef<'a, A> { |
|
fn fmt(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { |
|
let report: ReportAttachmentRef<'_, Dynamic> = self.into_dynamic(); |
|
crate::hooks::attachment_formatter::debug_attachment(report, None, formatter) |
|
} |
|
} |
It seems none of the default hooks/contructors ever pass down an
AttachmentParentmeaning that theAttachmentFormatterHookis (by default) unable to access the parent report.rootcause/src/report_attachment/ref_.rs
Lines 216 to 226 in 9a9fc4e
rootcause/src/report_attachment/ref_.rs
Lines 520 to 532 in 9a9fc4e