mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
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;
|
||||
|
||||
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue