From 9d0badedce19a5df3dbd2e5d8e00dec208c8f91a Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi Date: Tue, 28 Jul 2020 15:39:50 +0600 Subject: [PATCH] Add setters to PassportElementErrorReverseSide --- src/types/passport_element_error.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/types/passport_element_error.rs b/src/types/passport_element_error.rs index fd78ea3f..9b12d461 100644 --- a/src/types/passport_element_error.rs +++ b/src/types/passport_element_error.rs @@ -178,6 +178,28 @@ pub struct PassportElementErrorReverseSide { pub file_hash: String, } +impl PassportElementErrorReverseSide { + pub fn new(r#type: PassportElementErrorReverseSideType, file_hash: S) -> Self + where + S: Into, + { + Self { r#type, file_hash: file_hash.into() } + } + + pub fn r#type(mut self, val: PassportElementErrorReverseSideType) -> Self { + self.r#type = val; + self + } + + pub fn file_hash(mut self, val: S) -> Self + where + S: Into, + { + self.file_hash = val.into(); + self + } +} + //// Represents an issue with the selfie with a document. // /// The error is considered resolved when the file with the selfie changes.