nestxml/macros.rs
1// Copyright (C) 2018 Stephane Raux. Distributed under the MIT license.
2
3macro_rules! element_constructor {
4 ($name:ident) => {
5 #[doc="Returns an HTML element of the given type"]
6 pub fn $name<'a, W>(out: &'a mut ::xml::EventWriter<W>)
7 -> $crate::Element<'a, W>
8 where
9 W: ::std::io::Write + 'a,
10 {
11 $crate::element(out, stringify!($name))
12 }
13 };
14}