Skip to main content

Module cursor

Module cursor 

Source
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§

SegmentCursor
A cursor that tracks position within a segment slice during assembly.
SegmentNotFound
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.