diff --git a/src/pubsub/pubsub.rs b/src/pubsub/pubsub.rs index 8faf9c4..39b30c7 100644 --- a/src/pubsub/pubsub.rs +++ b/src/pubsub/pubsub.rs @@ -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 ``. #[derive(Debug, Clone)] pub struct Item(pub PubSubItem);