pub fn optional_element<'a>(seg: &'a Segment<'_>, idx: usize) -> Option<&'a str>
Extract an optional text element from a segment.
Returns the element’s first component, or None if absent or empty.