macro_rules! xml_path_type {
($type_name:ident : $($r_tag_name:tt $(=> $r_t:ty)?),+) => { ... };
(@structs $suffix:ident $tag_name:literal $(=> $t:ty)?) => { ... };
(@structs $suffix:ident * $(=> $t:ty)?) => { ... };
(@structs $suffix:ident $tag_name:literal $(=> $t:ty)?, $($r_tag_name:tt $(=> $r_t:ty)?),+) => { ... };
(@structs $suffix:ident * $(=> $t:ty)?, $($r_tag_name:tt $(=> $r_t:ty)?),+) => { ... };
(@types $type_name:ident $suffix:ident $tag_name:literal => $t:ty) => { ... };
(@types $type_name:ident $suffix:ident * => $t:ty) => { ... };
(@types $type_name:ident $suffix:ident $tag_name:literal) => { ... };
(@types $type_name:ident $suffix:ident *) => { ... };
(@types $type_name:ident $suffix:ident $tag_name:literal => $t:ty, $($r_tag_name:tt $(=> $r_t:ty)?),+) => { ... };
(@types $type_name:ident $suffix:ident * => $t:ty, $($r_tag_name:tt $(=> $r_t:ty)?),+) => { ... };
(@types $type_name:ident $suffix:ident $tag_name:literal, $($r_tag_name:tt $(=> $r_t:ty)?),+) => { ... };
(@types $type_name:ident $suffix:ident *, $($r_tag_name:tt $(=> $r_t:ty)?),+) => { ... };
}
Macro that expands to type ... = ...
alias of XML path.
The XML path if fully encoded in the type, including the names of the tags to be matched.
The resulting type is Default
-constructible. This allows you to create the TreeDeserializer
using the new
and from_reader
functions. This is useful if for example you need to store
the deserializer in an associated type.
xml_path_type!(MyPath: "aaa", *, "ccc" => Ccc, "ddd", * => Eee);