Add setters to MessagePinned

This commit is contained in:
Temirkhan Myrzamadi 2020-07-28 01:43:34 +06:00
parent f5b81e87b4
commit 5d6604bd52

View file

@ -333,6 +333,17 @@ pub struct MessagePinned {
pub pinned: Box<Message>,
}
impl MessagePinned {
pub fn new(pinned: Message) -> Self {
Self { pinned: Box::new(pinned) }
}
pub fn pinned(mut self, val: Message) -> Self {
self.pinned = Box::new(val);
self
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[non_exhaustive]
pub struct MessageInvoice {