| Crates.io | shapely-yaml |
| lib.rs | shapely-yaml |
| version | 3.1.0 |
| created_at | 2025-03-11 12:47:26.466427+00 |
| updated_at | 2025-03-31 19:08:30.157313+00 |
| description | YAML serialization and deserialization for Shapely types |
| homepage | https://github.com/bearcove/shapely |
| repository | https://github.com/bearcove/shapely |
| max_upload_size | |
| id | 1587906 |
| size | 10,404 |
YAML serialization and deserialization for Shapely types.
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 });
Thanks to Namespace for providing fast GitHub Actions workers:
Licensed under either of:
at your option.