hydr_structures/structures/gate/
applicability.rs1use crate::structures::{StructureError, definition};
4
5#[derive(Clone, Debug, PartialEq, Eq)]
7pub struct GateApplicability {
8 pub coefficient_provenance: String,
10 pub hydrostatic_quiescent_pool_assertion: String,
12 pub free_submerged_aperture_applicability: String,
14 pub unobstructed_aperture_assertion: String,
16 pub symmetric_reversal: bool,
18}
19impl GateApplicability {
20 pub(crate) fn check(&self) -> Result<(), StructureError> {
21 for (value, field) in [
22 (&self.coefficient_provenance, "coefficient_provenance"),
23 (
24 &self.hydrostatic_quiescent_pool_assertion,
25 "hydrostatic_quiescent_pool_assertion",
26 ),
27 (
28 &self.free_submerged_aperture_applicability,
29 "free_submerged_aperture_applicability",
30 ),
31 (
32 &self.unobstructed_aperture_assertion,
33 "unobstructed_aperture_assertion",
34 ),
35 ] {
36 definition::text(value, field)?;
37 }
38 Ok(())
39 }
40}