#[non_exhaustive]pub struct PartialHorizontalLayout {
pub runs: Vec<LoweredAlignmentCurve>,
pub refused: Vec<RefusedSegment>,
pub segment_count: usize,
}Expand description
A horizontal layout lowered as far as exactness allows.
Real railway and highway alignments interleave transition spirals between their lines and arcs, so an all-or-nothing lowering refuses essentially every production file. This result keeps what is exactly lowerable and names what is not, instead of collapsing both into one opaque error.
runs holds maximal stretches of consecutive lowerable segments, each
assembled into a single composite exactly as lower_horizontal_layout
would, seams included. A run ends only where a segment is refused:
continuity across a segment this crate did not lower is not a fact it is
entitled to assert. A seam after a transition spiral does not end a run;
it is recorded in that run’s seams as unverified.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.runs: Vec<LoweredAlignmentCurve>Maximal runs of consecutive exactly-lowered segments, in authored order.
refused: Vec<RefusedSegment>Refused segments in authored order.
segment_count: usizeTotal segments nested by the layout, lowered or not.
Implementations§
Source§impl PartialHorizontalLayout
impl PartialHorizontalLayout
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Whether every segment lowered exactly.
When true the layout is covered by exactly one run, matching what
lower_horizontal_layout returns: runs split only at refused
segments, never at a seam after a spiral.
Sourcepub fn lowered_count(&self) -> usize
pub fn lowered_count(&self) -> usize
Number of segments lowered exactly.