iq: Implement the Iq*Payload traits on every possible payload.
This commit is contained in:
parent
d5f88d2636
commit
412eafb363
11 changed files with 64 additions and 0 deletions
|
|
@ -8,6 +8,7 @@ use try_from::TryFrom;
|
|||
use minidom::Element;
|
||||
use error::Error;
|
||||
use ns;
|
||||
use iq::{IqGetPayload, IqResultPayload};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Version {
|
||||
|
|
@ -16,6 +17,9 @@ pub struct Version {
|
|||
pub os: Option<String>,
|
||||
}
|
||||
|
||||
impl IqGetPayload for Version {}
|
||||
impl IqResultPayload for Version {}
|
||||
|
||||
impl TryFrom<Element> for Version {
|
||||
type Err = Error;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue