diff --git a/parsers/src/muc/user.rs b/parsers/src/muc/user.rs index 2f3660f3..3c7390da 100644 --- a/parsers/src/muc/user.rs +++ b/parsers/src/muc/user.rs @@ -225,6 +225,38 @@ impl Item { reason: None, } } + + /// Set a jid for this Item + pub fn with_jid>(mut self, jid: J) -> Item { + self.jid = Some(jid.into()); + self + } + + /// Set a nick for this Item + pub fn with_nick>(mut self, nick: S) -> Item { + self.nick = Some(nick.into()); + self + } + + /// Set an actor for this Item + pub fn with_actor(mut self, actor: Actor) -> Item { + self.actor = Some(actor); + self + } + + /// Set a continue value for this Item + pub fn with_continue>(mut self, continue_: S) -> Item { + self.continue_ = Some(Continue { + thread: Some(continue_.into()), + }); + self + } + + /// Set a reason for this Item + pub fn with_reason>(mut self, reason: S) -> Item { + self.reason = Some(Reason(reason.into())); + self + } } generate_element!(