Add setters to PassportElementErrorFiles

This commit is contained in:
Temirkhan Myrzamadi 2020-07-28 15:41:05 +06:00
parent e6beb7d16b
commit 670109fdca

View file

@ -291,6 +291,28 @@ pub struct PassportElementErrorFiles {
pub file_hashes: Vec<String>,
}
impl PassportElementErrorFiles {
pub fn new<S>(r#type: PassportElementErrorFilesType, file_hash: S) -> Self
where
S: Into<String>,
{
Self { r#type, file_hash: file_hash.into() }
}
pub fn r#type(mut self, val: PassportElementErrorFilesType) -> 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 one of the files that constitute the
/// translation of a document.
///