fastpasta_toml_macro

Crates.iofastpasta_toml_macro
lib.rsfastpasta_toml_macro
version0.1.1
sourcesrc
created_at2023-07-07 08:49:56.817665
updated_at2023-07-15 09:08:25.676202
descriptionDEPRECATED. Development continues at: https://crates.io/crates/descriptive_toml_derive. Convenience crate with a trait definition for use with the procedural derive macro fastpasta_toml_macro_derive.
homepage
repositoryhttps://gitlab.cern.ch/mkonig/fastpasta
max_upload_size
id910577
size5,318
Marc (CramBL)

documentation

README

DEPRECATED - MOVED TO https://crates.io/crates/descriptive_toml_derive

Description

Convenience crate with a trait definition for use with the procedural derive macro fastpasta_toml_macro_derive.

Example

use fastpasta_toml_macro::TomlConfig;

#[derive(TomlConfig, Default)]
pub struct CustomChecks {
    #[description = "Number of CRU Data Packets expected in the data"]
    #[example = "20, 500532"]
    cdps: Option<u32>,
}
let toml_string = CustomChecks::default().to_string_pretty_toml();
        assert_eq!(
            toml_string,
            "\
# Number of CRU Data Packets expected in the data
# Example: 20, 500532
#cdps = None [ u32 ] # (Uncomment and set to enable this check)

"
Commit count: 0

cargo fmt