Registry / serialization / parse-display

parse-display

JSON →
library0.10.0rscratesunverified

Procedural macro to implement Display and FromStr using common settings.

# Cargo.toml [dependencies] parse-display = "0.10.0"
INSTALL
IMPORT
SIG · PARSE-DISPLAY
P
parse-display
serializationrustv0.10.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 parse_display::Display;

Derive Display and FromStr with custom format strings.

use parse_display::{Display, FromStr}; #[derive(Display, FromStr)] #[display("{x},{y}")] struct Point { x: i32, y: i32, } fn main() { let p = Point { x: 1, y: 2 }; println!("{}", p); // prints "1,2" let parsed: Point = "3,4".parse().unwrap(); println!("{:?}", parsed); }
Debug
Known issues
gotchaThe `#[display(...)]` attribute syntax can be complex for nested types.
fix
Refer to the documentation for advanced formatting options; keep format strings simple.
affects: >=0.1.0
Upgrade
Version history
0.10.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
parse-display — cargo add parse-display · libregistry