mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-10 12:02:22 +01:00
Add setters to MessageNewChatPhoto
This commit is contained in:
parent
5e4deb1eeb
commit
2b0a05ef08
1 changed files with 17 additions and 0 deletions
|
@ -210,6 +210,23 @@ pub struct MessageNewChatPhoto {
|
|||
pub new_chat_photo: Vec<PhotoSize>,
|
||||
}
|
||||
|
||||
impl MessageNewChatPhoto {
|
||||
pub fn new<N>(new_chat_photo: N) -> Self
|
||||
where
|
||||
N: Into<Vec<PhotoSize>>,
|
||||
{
|
||||
Self { new_chat_photo: new_chat_photo.into() }
|
||||
}
|
||||
|
||||
pub fn new_chat_photo<N>(mut self, val: N) -> Self
|
||||
where
|
||||
N: Into<Vec<PhotoSize>>,
|
||||
{
|
||||
self.new_chat_photo = val.into();
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MessageDeleteChatPhoto {
|
||||
|
|
Loading…
Reference in a new issue