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§
- 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.
- expect_
segment_ assembly - Wrapper version of
expect_segmentthat returnsAssemblyErrorinstead ofSegmentNotFound. - peek_is
- Check if the segment at the cursor’s current position matches a tag.