Skip to main content

Module core

Module core 

Source
Expand description

I/O-free query core: parse + solve, producing the message bytes for the two failure classes. The envelope shape and its plural encodings live in crate::wire — this module is the solve side plus the shared exhausted rule, with no commitment to where output bytes go or how they’re encoded. Both the CLI shell (entry.rs) and the Tier-2 reactor (reactor.rs) call run_query here, then build a crate::wire::Envelope and hand it to a chosen crate::wire::EncoderDesc — so the shape has one source and can’t drift between transports.

Enums§

QueryResult
Outcome of running one query, with the prefixed message the wire contract puts on the wire for the two failure classes. The caller maps these to its own surface — exit codes 2/3 for the CLI, an error document for the reactor — but the message bytes are produced once, here.

Functions§

exhausted
The exhausted flag: the search ran to completion unless a --limit stopped it exactly at the cap. Single-sourced so the CLI and the reactor compute it identically.
run_query
Parse q against the program in m, then solve it. The caller must have already reset per-query state and set the per-query limits; this consumes m.error on the error path so the message can be returned.