#[derive(DebugAttr)]
{
// Attributes available to this derive:
#[fmt]
#[fmt_debug]
}
Expand description
Derive macro for implementing std::fmt::Debug.
§Attributes
#[fmt_debug("...", args...)]- Format string specifically forDebug(highest priority)#[fmt("...", args...)]- Shared format string for bothDisplayandDebug(fallback)
§Example
use format_attr::DebugAttr;
#[derive(DebugAttr)]
#[fmt_debug("User {{ name: {} }}", self.name)]
struct User {
name: String,
}