#[derive(PartialDebug)]Expand description
Implements Debug for a struct replacing all fields that do not implement Debug with a placeholder.
ยงWhat it does:
struct NoDebug;
#[derive(PartialDebug)]
struct Struct {
field: NoDebug,
}Expands to something like:
impl Debug for Struct {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Struct")
.field(
"field",
match &self.field.try_as_debug() {
Ok(field) => field,
Err(_) => &rusteval::specialization::Unknown,
},
)
.finish()
}
}