mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-31 16:40:37 +01:00
Add setters to PassportElementErrorSelfie
This commit is contained in:
parent
9d0badedce
commit
c60e6fa1eb
1 changed files with 22 additions and 0 deletions
|
@ -215,6 +215,28 @@ pub struct PassportElementErrorSelfie {
|
|||
pub file_hash: String,
|
||||
}
|
||||
|
||||
impl PassportElementErrorSelfie {
|
||||
pub fn new<S>(r#type: PassportElementErrorSelfieType, file_hash: S) -> Self
|
||||
where
|
||||
S: Into<String>,
|
||||
{
|
||||
Self { r#type, file_hash: file_hash.into() }
|
||||
}
|
||||
|
||||
pub fn r#type(mut self, val: PassportElementErrorSelfieType) -> 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 document scan.
|
||||
///
|
||||
/// The error is considered resolved when the file with the document scan
|
||||
|
|
Loading…
Reference in a new issue