| Crates.io | format-ende-yaml |
| lib.rs | format-ende-yaml |
| version | 0.1.1 |
| created_at | 2025-09-22 13:25:26.4495+00 |
| updated_at | 2025-09-22 17:55:36.863604+00 |
| description | format-ende implementation for the YAML file format, based on serde_yaml |
| homepage | |
| repository | https://codeberg.org/CoffeJunkStudio/format-ende |
| max_upload_size | |
| id | 1850028 |
| size | 7,804 |
format-endeThis crate provides an implementation of the format-ende traits for the JSON format based on the serde_yaml crate.
use format_ende::FormatEncoder;
use format_ende::FormatDecoder;
use format_ende_yaml::YamlFormat;
use std::io::Cursor;
let mut format = YamlFormat::new();
let mut buf: Vec<u8> = Vec::new();
let value = vec![
String::from("foo"),
String::from("bar"),
String::from("baz")
];
// Encode the value to YAML
format.encode(&mut buf, &value).unwrap();
// Decode the value back from YAML
let decoded: Vec<String> = format.decode(Cursor::new(buf)).unwrap();
assert_eq!(decoded, value);