delay: Implement IntoElements.
This commit is contained in:
parent
8b964df645
commit
4dc585f1c9
1 changed files with 9 additions and 1 deletions
10
src/delay.rs
10
src/delay.rs
|
@ -1,4 +1,5 @@
|
||||||
use minidom::Element;
|
use minidom::{Element, IntoElements};
|
||||||
|
use minidom::convert::ElementEmitter;
|
||||||
|
|
||||||
use error::Error;
|
use error::Error;
|
||||||
|
|
||||||
|
@ -40,6 +41,13 @@ pub fn serialise(delay: &Delay) -> Element {
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl IntoElements for Delay {
|
||||||
|
fn into_elements(self, emitter: &mut ElementEmitter) {
|
||||||
|
let elem = serialise(&self);
|
||||||
|
emitter.append_child(elem)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use minidom::Element;
|
use minidom::Element;
|
||||||
|
|
Loading…
Reference in a new issue