2 releases
0.1.1 | Sep 9, 2024 |
---|---|
0.1.0 | Aug 29, 2024 |
#921 in Procedural macros
1,891 downloads per month
Used in 12 crates
(via deb822-lossless)
11KB
160 lines
This crate provides a basic proc-macro for converting a Deb822Paragraph into a Rust struct and vice versa.
You probably want to use the deb822_lossless
crate instead,
with the derive
feature enabled.
Example
use deb822_lossless::Deb822;
#[derive(Deb822)]
struct Foo {
field1: String,
field2: Option<String>,
}
let paragraph: deb822::Deb822Paragraph = "field1: value1\nfield2: value2".parse().unwrap();
let foo: Foo = paragraph.into();
Dependencies
~245–690KB
~16K SLoC