Skip to main content

Module cursor

Module cursor 

Source
Expand description

Segment cursor for tracking position during MIG-guided assembly.

The core types live in mig-types::cursor — re-exported here for backward compatibility so existing use crate::cursor::* paths work.

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.
expect_segment_assembly
Wrapper version of expect_segment that returns AssemblyError instead of SegmentNotFound.
peek_is
Check if the segment at the cursor’s current position matches a tag.