mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
pubsub: Add a constructor for items request.
This commit is contained in:
parent
7665f7e5d8
commit
5338cd6599
1 changed files with 12 additions and 0 deletions
|
@ -113,6 +113,18 @@ generate_element!(
|
|||
]
|
||||
);
|
||||
|
||||
impl Items {
|
||||
/// Create a new items request.
|
||||
pub fn new(node: &str) -> Items {
|
||||
Items {
|
||||
node: NodeName(String::from(node)),
|
||||
max_items: None,
|
||||
subid: None,
|
||||
items: Vec::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Response wrapper for a PubSub `<item/>`.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Item(pub PubSubItem);
|
||||
|
|
Loading…
Reference in a new issue