mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Add setters to PassportElementErrorUnspecified
This commit is contained in:
parent
e5c7980659
commit
824ad20ee9
1 changed files with 22 additions and 0 deletions
|
@ -406,6 +406,28 @@ pub struct PassportElementErrorUnspecified {
|
|||
pub element_hash: String,
|
||||
}
|
||||
|
||||
impl PassportElementErrorUnspecified {
|
||||
pub fn new<S>(r#type: PassportElementErrorUnspecifiedType, file_hash: S) -> Self
|
||||
where
|
||||
S: Into<String>,
|
||||
{
|
||||
Self { r#type, element_hash: file_hash.into() }
|
||||
}
|
||||
|
||||
pub fn r#type(mut self, val: PassportElementErrorUnspecifiedType) -> Self {
|
||||
self.r#type = val;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn element_hash<S>(mut self, val: S) -> Self
|
||||
where
|
||||
S: Into<String>,
|
||||
{
|
||||
self.element_hash = val.into();
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[non_exhaustive]
|
||||
|
|
Loading…
Add table
Reference in a new issue