mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-09 11:43:57 +01:00
Add setters to EncryptedPassportElementUtilityBill
This commit is contained in:
parent
ffedac94fc
commit
b3c89af68c
1 changed files with 26 additions and 0 deletions
|
@ -440,6 +440,7 @@ impl EncryptedPassportElementInternalPassport {
|
|||
self.selfie = val;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn translation<P>(mut self, val: P) -> Self
|
||||
where
|
||||
P: Into<Vec<PassportFile>>,
|
||||
|
@ -508,6 +509,31 @@ pub struct EncryptedPassportElementUtilityBill {
|
|||
pub translation: Option<Vec<PassportFile>>,
|
||||
}
|
||||
|
||||
impl EncryptedPassportElementUtilityBill {
|
||||
pub fn new<F>(files: F) -> Self
|
||||
where
|
||||
F: Into<Vec<PassportFile>>,
|
||||
{
|
||||
Self { files: files.into(), translation: None }
|
||||
}
|
||||
|
||||
pub fn files<P>(mut self, val: P) -> Self
|
||||
where
|
||||
P: Into<Vec<PassportFile>>,
|
||||
{
|
||||
self.files = val.into();
|
||||
self
|
||||
}
|
||||
|
||||
pub fn translation<P>(mut self, val: P) -> Self
|
||||
where
|
||||
P: Into<Vec<PassportFile>>,
|
||||
{
|
||||
self.translation = Some(val.into());
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
|
|
Loading…
Reference in a new issue