Expand description
Segment cursor for tracking position during MIG-guided assembly.
Lives in mig-types so that generated PID from_segments() impls
can use cursor helpers without depending on mig-assembly.
Structs§
- Segment
Cursor - A cursor that tracks position within a segment slice during assembly.
- Segment
NotFound - Error returned when an expected segment is not found at the cursor position.
Functions§
- consume
- Consume the segment at the cursor’s current position, advancing the cursor. Returns None if the cursor is exhausted.
- expect_
segment - Consume the segment at cursor if it matches the expected tag. Returns Err if exhausted or tag mismatch.
- peek_is
- Check if the segment at the cursor’s current position matches a tag.