Derive debug extras
More customisable #[derive(Debug)]
Adds three options:
#[debug_single_tuple_inline]
use DebugMore;
;
Verbose debugging on A
retains single line under verbose.
e.g. for println!("{:#?}", vec![A(123), A(145), A(125),])
// With #[debug_single_tuple_inline]
// Without #[debug_single_tuple_inline]
#[debug_single_tuple_inline]
works on enums as well. Will fail for unnamed tuples with more than one field or named fields.
#[debug_ignore]
Ignores the _y
field when debugging
#[debug_as_display]
Prints the x
field out as if it was formatted with Display
e.g. for println!("{:#?}", D("Hello World".to_string()))
// With #[debug_as_display]
// Without #[debug_as_display]