diff --git a/src/delay.rs b/src/delay.rs index 54fa7e8..6d0634a 100644 --- a/src/delay.rs +++ b/src/delay.rs @@ -1,4 +1,5 @@ -use minidom::Element; +use minidom::{Element, IntoElements}; +use minidom::convert::ElementEmitter; use error::Error; @@ -40,6 +41,13 @@ pub fn serialise(delay: &Delay) -> Element { .build() } +impl IntoElements for Delay { + fn into_elements(self, emitter: &mut ElementEmitter) { + let elem = serialise(&self); + emitter.append_child(elem) + } +} + #[cfg(test)] mod tests { use minidom::Element;