Procedural macro to implement Display and FromStr using common settings.
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.
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);
}
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.