shapely-yaml

Crates.ioshapely-yaml
lib.rsshapely-yaml
version3.1.0
created_at2025-03-11 12:47:26.466427+00
updated_at2025-03-31 19:08:30.157313+00
descriptionYAML serialization and deserialization for Shapely types
homepagehttps://github.com/bearcove/shapely
repositoryhttps://github.com/bearcove/shapely
max_upload_size
id1587906
size10,404
Amos Wenger (fasterthanlime)

documentation

https://docs.rs/shapely

README

shapely-yaml

experimental free of syn crates.io documentation MIT/Apache-2.0 licensed

YAML serialization and deserialization for Shapely types.

Example

use shapely::Shapely;
use shapely_yaml::from_yaml;

#[derive(Debug, Shapely, PartialEq)]
struct Config {
    name: String,
    version: u64,
}

let yaml = r#"
name: MyApp
version: 1
"#;

let mut partial = Config::partial();
from_yaml(&mut partial, yaml).expect("Failed to parse YAML");

let config = partial.build::<Config>();
assert_eq!(config, Config { name: "MyApp".to_string(), version: 1 });

Funding

Thanks to Namespace for providing fast GitHub Actions workers:

License

Licensed under either of:

at your option.

Commit count: 1690

cargo fmt