S0025: ingress effect in effect expression
Generated from rellum-diagnostics/src/db.rs.
Explanation
Ingress effects observe external input during Observe and are valid only as event sources. Effect expressions run during Fire, so they can contain output effects but not ingress effects.
Common causes
- calling stdin_line!, stdin_char!, button!, or tick_ms! from a ! binding
- trying to poll input directly from an effect body
- using an event source where an output effect was expected
Canonical fixes
- declare an event for ingress input
Before:
main! = stdin_line!()
After:
line = event(stdin_line!())
main! on line => print!(line)
- use output effects in effect expressions
Code example
main! = stdin_line!()