mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
Add setters to PassportElementErrorFiles
This commit is contained in:
parent
e6beb7d16b
commit
670109fdca
1 changed files with 22 additions and 0 deletions
|
@ -291,6 +291,28 @@ pub struct PassportElementErrorFiles {
|
|||
pub file_hashes: Vec<String>,
|
||||
}
|
||||
|
||||
impl PassportElementErrorFiles {
|
||||
pub fn new<S>(r#type: PassportElementErrorFilesType, file_hash: S) -> Self
|
||||
where
|
||||
S: Into<String>,
|
||||
{
|
||||
Self { r#type, file_hash: file_hash.into() }
|
||||
}
|
||||
|
||||
pub fn r#type(mut self, val: PassportElementErrorFilesType) -> Self {
|
||||
self.r#type = val;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn file_hash<S>(mut self, val: S) -> Self
|
||||
where
|
||||
S: Into<String>,
|
||||
{
|
||||
self.file_hash = val.into();
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
/// Represents an issue with one of the files that constitute the
|
||||
/// translation of a document.
|
||||
///
|
||||
|
|
Loading…
Reference in a new issue