read_axis

Function read_axis 

Source
pub fn read_axis(
    r: &ResolvedSolveRequestV1,
    axis: InputAxis,
) -> Option<AxisValue>
Expand description

Read the current value of one taxonomy axis off a resolved request.

Returns None in two DIFFERENT situations a caller should not conflate:

  • the axis is an optional request field that was never supplied (Length, Latitude, ZeroPoiUp/ZeroPoiRight, SightOffsetLateral) – the axis exists, it just has no value on this particular request; or
  • the axis is structurally unavailable given how a sibling field resolved – currently only WindSpeed/WindDirection/WindVertical under ResolvedWindV1::Segmented, where there is no single scalar wind value to read at all (taxonomy.rs Known Limitation (c)).

Either way, None means “there is nothing to perturb here”: a caller sweeping InputAxis::ALL should skip the axis, never invent a value for it.