mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Add setters to PassportElementErrorTranslationFiles
This commit is contained in:
parent
9e0e338b5a
commit
e5c7980659
1 changed files with 22 additions and 0 deletions
|
@ -368,6 +368,28 @@ pub struct PassportElementErrorTranslationFiles {
|
|||
pub file_hashes: Vec<String>,
|
||||
}
|
||||
|
||||
impl PassportElementErrorTranslationFiles {
|
||||
pub fn new<S>(r#type: PassportElementErrorTranslationFilesType, file_hash: S) -> Self
|
||||
where
|
||||
S: Into<String>,
|
||||
{
|
||||
Self { r#type, file_hashes: file_hash.into() }
|
||||
}
|
||||
|
||||
pub fn r#type(mut self, val: PassportElementErrorTranslationFilesType) -> Self {
|
||||
self.r#type = val;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn file_hashes<S>(mut self, val: S) -> Self
|
||||
where
|
||||
S: Into<String>,
|
||||
{
|
||||
self.file_hashes = val.into();
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
/// Represents an issue in an unspecified place.
|
||||
///
|
||||
/// The error is considered resolved when new data is added.
|
||||
|
|
Loading…
Add table
Reference in a new issue