pub struct MeshQueryPlanner<'a, F>{
pub capability_index: &'a CapabilityIndex,
pub rtt_lookup: F,
}Expand description
The planner. Borrows the capability index for holder
lookups + ChainRef::Discovered resolution. Borrows an RTT
lookup closure so the cost-estimate path stays decoupled
from the proximity-graph internals (mirrors the
CapabilityQuery::nearest pattern).
Lifetimes: 'a ties the borrows together; one planner per
plan() call typically. The planner itself holds no state
— same inputs produce the same plan.
Fields§
§capability_index: &'a CapabilityIndexCapability index used for Discovered resolution + holder
lookup.
rtt_lookup: FRTT lookup closure. Same shape as
CapabilityQuery::nearest.
Implementations§
Source§impl<'a, F> MeshQueryPlanner<'a, F>
impl<'a, F> MeshQueryPlanner<'a, F>
Sourcepub fn new(capability_index: &'a CapabilityIndex, rtt_lookup: F) -> Self
pub fn new(capability_index: &'a CapabilityIndex, rtt_lookup: F) -> Self
Construct a planner. Doesn’t allocate.
Sourcepub fn plan(&self, query: &MeshQuery) -> Result<ExecutionPlan, MeshError>
pub fn plan(&self, query: &MeshQuery) -> Result<ExecutionPlan, MeshError>
Translate a MeshQuery into an ExecutionPlan.
Phase A handles atomic operators end-to-end; composite
operators recurse into their inner sub-queries and
emit a NotYetImplemented wrapper for the outer.
Errors per MeshError:
PlannerError { detail: "unsupported query version" }if the outer enum version isn’tV1.NoCapableHolder { ... }if aDiscoveredpredicate resolves to zero origin hashes.HistoricalRangeUnavailable { ... }if aBetweenquery’s range isn’t covered by any reachable holder.