Crates.io | hifa_yaserde_derive |
lib.rs | hifa_yaserde_derive |
version | 0.9.3 |
source | src |
created_at | 2024-05-07 05:11:52.510683 |
updated_at | 2024-05-07 05:52:33.530507 |
description | Serialization and deserialization macros |
homepage | https://github.com/hifa-lang/yaserde |
repository | https://github.com/hifa-lang/yaserde |
max_upload_size | |
id | 1231838 |
size | 82,071 |
Yet Another Serializer/Deserializer specialized for XML
This is a modified version of the project in media-io/yaserde.
This library will support XML de/ser-ializing with all specific features.
Any type can define a custom deserializer and/or serializer. To implement it, define the implementation of YaDeserialize/YaSerialize
impl YaDeserialize for MyType {
fn deserialize<R: Read>(reader: &mut hifa_yaserde::de::Deserializer<R>) -> Result<Self, String> {
// deserializer code
}
}
impl YaSerialize for MyType {
fn serialize<W: Write>(&self, writer: &mut hifa_yaserde::ser::Serializer<W>) -> Result<(), String> {
// serializer code
}
}