diff --git a/src/presence.rs b/src/presence.rs index e74a6e2..30a2615 100644 --- a/src/presence.rs +++ b/src/presence.rs @@ -211,6 +211,36 @@ impl Presence { payloads: vec!(), } } + + pub fn with_from(mut self, from: Option) -> Presence { + self.from = from; + self + } + + pub fn with_to(mut self, to: Option) -> Presence { + self.to = to; + self + } + + pub fn with_id(mut self, id: Option) -> Presence { + self.id = id; + self + } + + pub fn with_show(mut self, show: Show) -> Presence { + self.show = show; + self + } + + pub fn with_priority(mut self, priority: i8) -> Presence { + self.priority = priority; + self + } + + pub fn with_payloads(mut self, payloads: Vec) -> Presence { + self.payloads = payloads; + self + } } impl TryFrom for Presence {