use crate::structures::{StructureError, definition};
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct GateApplicability {
pub coefficient_provenance: String,
pub hydrostatic_quiescent_pool_assertion: String,
pub free_submerged_aperture_applicability: String,
pub unobstructed_aperture_assertion: String,
pub symmetric_reversal: bool,
}
impl GateApplicability {
pub(crate) fn check(&self) -> Result<(), StructureError> {
for (value, field) in [
(&self.coefficient_provenance, "coefficient_provenance"),
(
&self.hydrostatic_quiescent_pool_assertion,
"hydrostatic_quiescent_pool_assertion",
),
(
&self.free_submerged_aperture_applicability,
"free_submerged_aperture_applicability",
),
(
&self.unobstructed_aperture_assertion,
"unobstructed_aperture_assertion",
),
] {
definition::text(value, field)?;
}
Ok(())
}
}