mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Add setters to PassportElementErrorFile
This commit is contained in:
parent
c60e6fa1eb
commit
e6beb7d16b
1 changed files with 22 additions and 0 deletions
|
@ -253,6 +253,28 @@ pub struct PassportElementErrorFile {
|
|||
pub file_hash: String,
|
||||
}
|
||||
|
||||
impl PassportElementErrorFile {
|
||||
pub fn new<S>(r#type: PassportElementErrorFileType, file_hash: S) -> Self
|
||||
where
|
||||
S: Into<String>,
|
||||
{
|
||||
Self { r#type, file_hash: file_hash.into() }
|
||||
}
|
||||
|
||||
pub fn r#type(mut self, val: PassportElementErrorFileType) -> 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 a list of scans.
|
||||
///
|
||||
/// The error is considered resolved when the list of files containing the scans
|
||||
|
|
Loading…
Add table
Reference in a new issue