mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-24 23:57:38 +01:00
Add setters to PassportElementErrorFrontSide
This commit is contained in:
parent
08d6666698
commit
44ec6450cf
1 changed files with 57 additions and 0 deletions
|
@ -87,6 +87,41 @@ pub struct PassportElementErrorDataField {
|
||||||
pub data_hash: String,
|
pub data_hash: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl PassportElementErrorDataField {
|
||||||
|
pub fn new<S1, S2>(
|
||||||
|
r#type: PassportElementErrorDataFieldType,
|
||||||
|
field_name: S1,
|
||||||
|
data_hash: S2,
|
||||||
|
) -> Self
|
||||||
|
where
|
||||||
|
S1: Into<String>,
|
||||||
|
S2: Into<String>,
|
||||||
|
{
|
||||||
|
Self { r#type, field_name: field_name.into(), data_hash: data_hash.into() }
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn r#type(mut self, val: PassportElementErrorDataFieldType) -> Self {
|
||||||
|
self.r#type = val;
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn field_name<S>(mut self, val: S) -> Self
|
||||||
|
where
|
||||||
|
S: Into<String>,
|
||||||
|
{
|
||||||
|
self.field_name = val.into();
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn data_hash<S>(mut self, val: S) -> Self
|
||||||
|
where
|
||||||
|
S: Into<String>,
|
||||||
|
{
|
||||||
|
self.data_hash = val.into();
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Represents an issue with the front side of a document.
|
/// Represents an issue with the front side of a document.
|
||||||
///
|
///
|
||||||
/// The error is considered resolved when the file with the front side of the
|
/// The error is considered resolved when the file with the front side of the
|
||||||
|
@ -104,6 +139,28 @@ pub struct PassportElementErrorFrontSide {
|
||||||
pub file_hash: String,
|
pub file_hash: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl PassportElementErrorFrontSide {
|
||||||
|
pub fn new<S>(r#type: PassportElementErrorFrontSideType, file_hash: S) -> Self
|
||||||
|
where
|
||||||
|
S: Into<String>,
|
||||||
|
{
|
||||||
|
Self { r#type, file_hash: file_hash.into() }
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn r#type(mut self, val: PassportElementErrorFrontSideType) -> 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 the reverse side of a document.
|
/// Represents an issue with the reverse side of a document.
|
||||||
///
|
///
|
||||||
/// The error is considered resolved when the file with reverse side of the
|
/// The error is considered resolved when the file with reverse side of the
|
||||||
|
|
Loading…
Add table
Reference in a new issue