update README
This commit is contained in:
parent
0540b127bd
commit
9c274da9be
22
README.md
22
README.md
@ -1,15 +1,21 @@
|
|||||||
# yaserde
|
# yaserde
|
||||||
Yet Another Serializer/Deserializer
|
Yet Another Serializer/Deserializer
|
||||||
|
|
||||||
|
## Goal
|
||||||
|
This library will support XML de/ser-ializing with all specific features.
|
||||||
|
|
||||||
|
## Supported types
|
||||||
|
|
||||||
|
- [x] Struct
|
||||||
|
- [x] Vec<AnyType>
|
||||||
|
- [x] Enum
|
||||||
|
- [ ] Enum with complex types
|
||||||
- [ ] Option
|
- [ ] Option
|
||||||
- [ ] Enum
|
|
||||||
|
|
||||||
- [ ] Visitor Type -> String / String -> Type
|
## Decorators
|
||||||
- [ ] namespace
|
|
||||||
|
|
||||||
- [ ]
|
- [x] **root**: rename the based element. Used only at the XML root.
|
||||||
|
- [x] **rename**: be able to rename a field
|
||||||
|
- [x] **attribute**: this field is defined as an attribute
|
||||||
std::str::FromStr
|
- [x] **text**: this field match to the text content
|
||||||
std::string::ToString
|
- [ ] **namespace**: defines the namespace of the field
|
||||||
|
|||||||
@ -230,24 +230,6 @@ fn de_enum() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// #[derive(YaDeserialize, PartialEq, Debug)]
|
|
||||||
// pub enum Alpha {
|
|
||||||
// Transparent,
|
|
||||||
// Opaque,
|
|
||||||
// }
|
|
||||||
|
|
||||||
// impl Default for Alpha {
|
|
||||||
// fn default() -> Alpha {
|
|
||||||
// Alpha::Transparent
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// let content = "<?xml version=\"1.0\" encoding=\"utf-8\"?><base><background>Black</background></base>";
|
|
||||||
// convert_and_validate!(content, XmlStruct, XmlStruct{
|
|
||||||
// background: Color::Black
|
|
||||||
// });
|
|
||||||
|
|
||||||
let content = "<?xml version=\"1.0\" encoding=\"utf-8\"?><base><background>Black</background></base>";
|
let content = "<?xml version=\"1.0\" encoding=\"utf-8\"?><base><background>Black</background></base>";
|
||||||
convert_and_validate!(content, XmlStruct, XmlStruct{
|
convert_and_validate!(content, XmlStruct, XmlStruct{
|
||||||
background: Color::Black
|
background: Color::Black
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user