disco: Add a helper constructor for Feature.
This commit is contained in:
parent
376fa9f92e
commit
ede2b08039
1 changed files with 9 additions and 0 deletions
|
@ -34,6 +34,15 @@ attributes: [
|
||||||
var: String = "var" => required,
|
var: String = "var" => required,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
impl Feature {
|
||||||
|
/// Create a new `<feature/>` with the according `@var`.
|
||||||
|
pub fn new(var: &str) -> Feature {
|
||||||
|
Feature {
|
||||||
|
var: String::from(var)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Structure representing an `<identity xmlns='http://jabber.org/protocol/disco#info'/>` element.
|
/// Structure representing an `<identity xmlns='http://jabber.org/protocol/disco#info'/>` element.
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct Identity {
|
pub struct Identity {
|
||||||
|
|
Loading…
Reference in a new issue