Skip to main content

MeshQueryPlanner

Struct MeshQueryPlanner 

Source
pub struct MeshQueryPlanner<'a, F>
where F: Fn(u64) -> Option<Duration>,
{ 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: F

RTT lookup closure. Same shape as CapabilityQuery::nearest.

Implementations§

Source§

impl<'a, F> MeshQueryPlanner<'a, F>
where F: Fn(u64) -> Option<Duration>,

Source

pub fn new(capability_fold: &'a Fold<CapabilityFold>, rtt_lookup: F) -> Self

Construct a planner. Doesn’t allocate.

Source

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’t V1.
  • NoCapableHolder { ... } if a Discovered predicate resolves to zero origin hashes.
  • HistoricalRangeUnavailable { ... } if a Between query’s range isn’t covered by any reachable holder.

Auto Trait Implementations§

§

impl<'a, F> Freeze for MeshQueryPlanner<'a, F>
where F: Freeze,

§

impl<'a, F> !RefUnwindSafe for MeshQueryPlanner<'a, F>

§

impl<'a, F> Send for MeshQueryPlanner<'a, F>
where F: Send,

§

impl<'a, F> Sync for MeshQueryPlanner<'a, F>
where F: Sync,

§

impl<'a, F> Unpin for MeshQueryPlanner<'a, F>
where F: Unpin,

§

impl<'a, F> UnsafeUnpin for MeshQueryPlanner<'a, F>
where F: UnsafeUnpin,

§

impl<'a, F> !UnwindSafe for MeshQueryPlanner<'a, F>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more