pub struct ConstraintTypeDef {
pub type_id: &'static str,
pub short_name: &'static str,
pub long_name: &'static str,
pub label: &'static str,
pub element_count: usize,
pub duplicate_family: bool,
pub applicable: fn(&SelectionProbe) -> bool,
}Expand description
One constraint type’s static definition.
Fields§
§type_id: &'static strCanonical type string (lowercase snake — the persisted key).
short_name: &'static strId-mint prefix (CONC → CONC3) and the panel’s short label.
long_name: &'static strDisplay label (glyph-prefixed, matching the retired panel’s names).
label: &'static strPlain label for messages (“Duplicate … conflicts with Distance constraint DIST4.”).
element_count: usizeRequired elements count (fixed takes 1, everything else 2).
duplicate_family: boolMember of the duplicate-detection family (overlapping selection pairs conflict across these types — requirements §4.3).
applicable: fn(&SelectionProbe) -> boolSelection-context applicability (the feature context_applicable
pattern, [crate::feature_pipeline::context_offer]): does the current
selection make creating this constraint meaningful? Every element must
be component geometry ([super::mapping]’s resolve_element rejects
everything else), and the counted kinds are the ones the app’s element
seeder can actually produce (faces/edges, solids as COMPONENT refs —
never vertices, whose @-refs only the modal picker builds).