mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-24 09:16:12 +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>,
|
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
|
/// Represents an issue with one of the files that constitute the
|
||||||
/// translation of a document.
|
/// translation of a document.
|
||||||
///
|
///
|
||||||
|
|
Loading…
Add table
Reference in a new issue