xso-proc: provide FromXml::xml_name_matcher on derived impls
That way, derived implementations can also make use of the performance benefits.
This commit is contained in:
parent
126588b47d
commit
59af49c691
5 changed files with 166 additions and 3 deletions
|
|
@ -71,6 +71,7 @@ fn from_xml_impl(input: Item) -> Result<TokenStream> {
|
|||
defs,
|
||||
from_events_body,
|
||||
builder_ty_ident,
|
||||
name_matcher,
|
||||
} = def.make_from_events_builder(&vis, &name_ident, &attrs_ident)?;
|
||||
|
||||
#[cfg_attr(not(feature = "minidom"), allow(unused_mut))]
|
||||
|
|
@ -87,6 +88,10 @@ fn from_xml_impl(input: Item) -> Result<TokenStream> {
|
|||
) -> ::core::result::Result<Self::Builder, ::xso::error::FromEventsError> {
|
||||
#from_events_body
|
||||
}
|
||||
|
||||
fn xml_name_matcher() -> ::xso::fromxml::XmlNameMatcher<'static> {
|
||||
#name_matcher
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue