debug-derive

Crates.iodebug-derive
lib.rsdebug-derive
version2.1.2
sourcesrc
created_at2021-03-08 04:26:12.221505
updated_at2021-06-23 01:30:27.435777
descriptionTetcore macros to derive runtime debug implementation.
homepagehttps://core.tetcoin.org
repositoryhttps://github.com/tetcoin/tetcore
max_upload_size
id365506
size11,117
Marlon Hanks (marlonhanks)

documentation

https://docs.rs/debug-derive

README

debug-derive

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(debug_derive::RuntimeDebug)]
struct MyStruct;

assert_eq!(format!("{:?}", MyStruct), "MyStruct");
Commit count: 5279

cargo fmt