-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
I somehow possible to skip the child definition and just for example use:
#[xml(child = "*")]
childs: Vec<All>,or
#[xml(childall)]
childs: Vec<All>,
I have an enum like that:
#[derive(XmlWrite, XmlRead, PartialEq, Debug)]
pub enum All {
#[xml(tag = "Figura")] Figure(Figure),
#[xml(tag = "Pomiar")] Measurement(Measurement),
#[xml(tag = "Wyswietlacz")] Display(Display),
#[xml(tag = "Grupa")] Group(Group),
#[xml(tag = "GrupaObiektow")] GroupObjects(GroupObjects),
#[xml(tag = "Opis")] Desc(Desc),
}And doing:
#[xml(child = "Figura", child = "Pomiar", child = "Wyswietlacz", child = "Grupa", child="GrupaObiektow", child="Opis")]
childs: Vec<All>,Is just double work, or even in my case four times repeating that same thing because Group and GroupObjects also contain child's. The enum have all information need to parse child's, and it could just return some error "VariantNotFound" when an unknown child appears.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels