module

Phosphor::Constraint

Marker for a layout sizing rule. Layout#split accepts an Array(Constraint) and pattern-matches on the concrete type of each element to decide how much of the frame it gets.

Every constraint type below is a struct that includes Constraint — this lets heterogeneous constraints share one array type ([Length.new(1), Fill.new] of Constraint) while Layout still narrows to the concrete type via case/is_a?.

See DESIGN.md § "Layout and Constraint" for the full rationale.