Expand description
Automatic Debian control file parsing for structs.
Example
use debcontrol::{Paragraph, Field};
use debcontrol_struct::DebControl;
#[derive(DebControl)]
struct DerivedStruct {
first: String,
multiple_words: String,
optional: Option<String>,
}
let input = &debcontrol::parse_str(
"First: Hello\n\
Multiple-Words: World\n"
).unwrap()[0];
let derived = DerivedStruct::from_paragraph(&input).unwrap();
assert_eq!("Hello", derived.first);
assert_eq!("World", derived.multiple_words);
assert_eq!(None, derived.optional);