pub fn expect_segment<'a>(
segments: &'a [OwnedSegment],
cursor: &mut SegmentCursor,
tag: &str,
) -> Result<&'a OwnedSegment, SegmentNotFound>Expand description
Consume the segment at cursor if it matches the expected tag. Returns Err if exhausted or tag mismatch.