Registry / utility / display-derive

display-derive

JSON →
library0.0.0rscratesunverified

Derive the Display trait for custom types with minimal boilerplate.

# Cargo.toml [dependencies] display_derive = "0.0.0"
INSTALL
IMPORT
SIG · DISPLAY-DERIVE
D
display-derive
utilityrustv0.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Display
use display_derive::Display;

Derive Display for a struct and print it.

use display_derive::Display; #[derive(Display)] struct MyStruct { value: i32, } fn main() { let s = MyStruct { value: 42 }; println!("{}", s); }
Debug
Known issues
gotchaThis crate is very old (version 0.0.0) and may not be maintained; consider using the standard `derive_more` crate instead.
fix
Replace with `derive_more` in Cargo.toml: `derive_more = "0.99"` and use `#[derive(Display)]` from that crate.
affects: >=0.0.0
Upgrade
Version history
0.0.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
display-derive — cargo add display-derive · libregistry