#[derive(Dump)]
{
// Attributes available to this derive:
#[dump]
}
Expand description
The main entry point for the #[derive(Dump)] macro.
supported attributes:
#[dump(skip)]— skip this field entirely#[dump(skip_if = "expr")]— skip if the expression evaluates to true (expr can refer toselfand field names)#[dump(format = "fmt", arg1, arg2, ...)]— use a custom format string with optional arguments.#[dump(literal = "value")]— ignore the field value and print the literal instead#[dump(with = "path::to::func")]— use a custom function to format the field. The function should have signaturefn(&T, &mut Formatter) -> fmt::Resultwhere T is the field type.#[dump(take = n)]— for iterable fields, only include the first n items and show the count as “name(n/total)”#[dump(truncate = n)]— debug-format the field value, then truncate the output to n characters (adding “…” if truncated).