#[non_exhaustive]pub struct ValidationResult {
pub rule_name: String,
pub rule_description: String,
pub validation_result_type: ValidationResultType,
pub validation_details: String,
/* private fields */
}Expand description
Validation result for a single validation rule.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.rule_name: StringThe name of the validation rule.
rule_description: StringThe description of the validation rule.
validation_result_type: ValidationResultTypeThe result of the validation rule.
validation_details: StringThe detailed information of the running the validation process using the entity from the document based on the validation rule.
Implementations§
Source§impl ValidationResult
impl ValidationResult
pub fn new() -> Self
Sourcepub fn set_rule_name<T: Into<String>>(self, v: T) -> Self
pub fn set_rule_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_rule_description<T: Into<String>>(self, v: T) -> Self
pub fn set_rule_description<T: Into<String>>(self, v: T) -> Self
Sets the value of rule_description.
§Example
ⓘ
let x = ValidationResult::new().set_rule_description("example");Sourcepub fn set_validation_result_type<T: Into<ValidationResultType>>(
self,
v: T,
) -> Self
pub fn set_validation_result_type<T: Into<ValidationResultType>>( self, v: T, ) -> Self
Sets the value of validation_result_type.
§Example
ⓘ
use google_cloud_documentai_v1::model::document::entity_validation_output::validation_result::ValidationResultType;
let x0 = ValidationResult::new().set_validation_result_type(ValidationResultType::Valid);
let x1 = ValidationResult::new().set_validation_result_type(ValidationResultType::Invalid);
let x2 = ValidationResult::new().set_validation_result_type(ValidationResultType::Skipped);Sourcepub fn set_validation_details<T: Into<String>>(self, v: T) -> Self
pub fn set_validation_details<T: Into<String>>(self, v: T) -> Self
Sets the value of validation_details.
§Example
ⓘ
let x = ValidationResult::new().set_validation_details("example");Trait Implementations§
Source§impl Clone for ValidationResult
impl Clone for ValidationResult
Source§fn clone(&self) -> ValidationResult
fn clone(&self) -> ValidationResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValidationResult
impl Debug for ValidationResult
Source§impl Default for ValidationResult
impl Default for ValidationResult
Source§fn default() -> ValidationResult
fn default() -> ValidationResult
Returns the “default value” for a type. Read more
Source§impl Message for ValidationResult
impl Message for ValidationResult
Source§impl PartialEq for ValidationResult
impl PartialEq for ValidationResult
impl StructuralPartialEq for ValidationResult
Auto Trait Implementations§
impl Freeze for ValidationResult
impl RefUnwindSafe for ValidationResult
impl Send for ValidationResult
impl Sync for ValidationResult
impl Unpin for ValidationResult
impl UnwindSafe for ValidationResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more