What problem does it solve?
Adding or reviewing the Box<Self>-based suspend/resume (revalidation) mechanism on RediSearch query-engine iterators in Rust involves subtle memory-safety rules—allocation reuse, layout invariants, vtable-correct child transitions, and teardown on abort—where mistakes cause undefined behavior. This Skill encodes those rules as a checklist and reference so implementations and PR reviews stay sound.
Core Features & Use Cases
- Implementation checklist: Step-by-step rules for adding suspend/resume to leaf and generic wrapper iterators, including the non-negotiable allocation-reuse rule and the #[repr(C)] single-struct ref_mode pattern.
- Review checklist: A concrete list of invariants to verify in PRs touching boxed.rs, child-slot helpers, layout-invariant proofs, and aggregate result rebuilding.
- Pitfall catalog: Documents the type-erased vtable pitfall, the Option<I> niche-layout hazard, exhaustion semantics, panic-safety windows, and aggregate entry provenance rules.
- Use Case: When porting an iterator from legacy revalidate to the new suspend/resume traits, follow the guide to derive resume decisions from the existing revalidate, add the const layout proof, and write round-trip tests with a type-erased child.
Quick Start
Ask the assistant to review my PR that adds suspend/resume to a query-engine iterator using the rqe-iterator-suspend-resume checklist.