xso-proc: Add n = 1 flag to element meta
This allows exactly one arbitrary payload in any element, and is handled after every other element with a more specific matcher has been parsed. Both the #[xml(element(n = 1))] meta and its shortcut #[xml(element)] are allowed and treated the exact same way.
This commit is contained in:
parent
057306fba1
commit
c72cf3ddd1
7 changed files with 265 additions and 80 deletions
|
|
@ -67,10 +67,9 @@ impl Field for ChildField {
|
|||
} = scope;
|
||||
|
||||
let from_events = from_events_fn(element_ty.clone());
|
||||
let from_xml_builder = from_xml_builder_ty(element_ty.clone());
|
||||
|
||||
let matcher = quote! { #from_events(name, attrs) };
|
||||
let builder = from_xml_builder;
|
||||
let builder = from_xml_builder_ty(element_ty.clone());
|
||||
|
||||
(
|
||||
TokenStream::default(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue