Add setters to ForwardNonChannel

This commit is contained in:
Temirkhan Myrzamadi 2020-07-28 02:17:19 +06:00
parent 3e0f8ab686
commit 3c3a0aa474

View file

@ -505,6 +505,22 @@ pub struct ForwardNonChannel {
pub from: ForwardedFrom,
}
impl ForwardNonChannel {
pub fn new(date: i32, from: ForwardedFrom) -> Self {
Self { date, from }
}
pub fn date(mut self, val: i32) -> Self {
self.date = val;
self
}
pub fn from(mut self, val: ForwardedFrom) -> Self {
self.from = val;
self
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[non_exhaustive]
pub struct ForwardOrigin {