33 releases (12 major breaking)
14.0.0 | Jan 23, 2024 |
---|---|
13.0.0 | Dec 12, 2023 |
12.0.0 | Nov 1, 2023 |
11.0.0 | Oct 4, 2023 |
2.0.0-alpha.5 | Mar 24, 2020 |
#15 in #prevent
169,549 downloads per month
Used in 841 crates
(10 directly)
11KB
154 lines
Macros to derive runtime debug implementation.
This custom derive implements a core::fmt::Debug
trait,
but in case the std
feature is enabled the implementation
will actually print out the structure as regular derive(Debug)
would do. If std
is disabled the implementation will be empty.
This behaviour is useful to prevent bloating the runtime WASM blob from unneeded code.
#[derive(sp_debug_derive::RuntimeDebug)]
struct MyStruct;
assert_eq!(format!("{:?}", MyStruct), "MyStruct");
Dependencies
~200–630KB
~15K SLoC