deb822-derive

Crates.iodeb822-derive
lib.rsdeb822-derive
version0.2.0
sourcesrc
created_at2024-08-29 10:51:23.811981
updated_at2024-10-06 11:42:03.200188
descriptionDerive macro for deb822 style paragraphs
homepagehttps://github.com/jelmer/deb822-lossless
repositoryhttps://github.com/jelmer/deb822-lossless
max_upload_size
id1355963
size11,301
Jelmer Vernooij (jelmer)

documentation

README

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();
Commit count: 512

cargo fmt