← All docs
rewind() — internals
Compiler internals for rewind(): lowering path, type checks, and runtime helpers.
rewind() — internals
Where it lives
- Signature:
src/builtins/io/rewind.rs - Lowering:
src/codegen/lower_inst/builtins/io.rs:3192 (lower_rewind) - Function symbol:
lower_rewind()
Lowering notes
- Lowers
rewind(stream)aslseek(fd, 0, SEEK_SET)and clears EOF state on success.
Runtime helpers
No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.
Signature summary
function rewind(resource $stream): bool
What the type checker enforces
- Arity: takes exactly 1 argument.
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/filesystem/rewind.rs(eval_builtin!) - Dispatch hooks:
direct,values