macro_rules! auto_debug_props {
    ($v:expr) => { ... };
}
Expand description

auto_debug_props!(props) can auto output debug info for props.

If props impl DebugProps, then DebugProps::as_debug_props will be used;

Else if props impl Debug, then format!("{:#?}", props) will be used;

Else, the typename of props will be used.

Note that the type of the expr SHOULD NOT be references unless you know what it means.

The implementation is inspired by dtolnay’s autoref-specialization.