mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
Add setters to ForwardOrigin
This commit is contained in:
parent
3c3a0aa474
commit
baf46bbc8a
1 changed files with 12 additions and 1 deletions
|
@ -521,12 +521,23 @@ impl ForwardNonChannel {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct ForwardOrigin {
|
||||
pub reply_to_message: Option<Box<Message>>,
|
||||
}
|
||||
|
||||
impl ForwardOrigin {
|
||||
pub fn new() -> Self {
|
||||
Self::default()
|
||||
}
|
||||
|
||||
pub fn reply_to_message(mut self, val: Message) -> Self {
|
||||
self.reply_to_message = Some(Box::new(val));
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
#[non_exhaustive]
|
||||
|
|
Loading…
Reference in a new issue