pub trait AttachmentHandler<A>: 'static {
// Required methods
fn display(value: &A, formatter: &mut Formatter<'_>) -> Result;
fn debug(value: &A, formatter: &mut Formatter<'_>) -> Result;
// Provided method
fn preferred_formatting_style(
value: &A,
report_formatting_function: FormattingFunction,
) -> AttachmentFormattingStyle { ... }
}Expand description
Handler used to implement or override the behavior of core::fmt::Display
and core::fmt::Debug when creating an attachment.
Required Methods§
Provided Methods§
Sourcefn preferred_formatting_style(
value: &A,
report_formatting_function: FormattingFunction,
) -> AttachmentFormattingStyle
fn preferred_formatting_style( value: &A, report_formatting_function: FormattingFunction, ) -> AttachmentFormattingStyle
The function used when calling
RawAttachmentRef::preferred_formatting_style
The formatting style preferred by the attachment when formatted as part of a report.
§Arguments
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.