pub struct MeshQueryPlanner<'a, F>{
pub capability_fold: &'a Fold<CapabilityFold>,
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_fold: &'a Fold<CapabilityFold>Capability fold — read path for all holder discovery
(parent_of / children_of / collect_coverage) and the
Discovered-ref predicate filter
(capability_bridge::filter_by_predicate).
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_fold: &'a Fold<CapabilityFold>, rtt_lookup: F) -> Self
pub fn new(capability_fold: &'a Fold<CapabilityFold>, 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.