pub struct LocalMeshQueryExecutor<R: ChainReader> { /* private fields */ }Expand description
Single-node executor. Generic over a ChainReader so the
tests can drive it without needing a real RedEX file.
The executor optionally holds a Phase F result cache plus a snapshot of the local capability index’s mutation version (read at lookup time). Without these hooks, the executor still runs but caching is a no-op (matches the trait’s “implementors silently ignore options” contract).
Implementations§
Source§impl<R: ChainReader> LocalMeshQueryExecutor<R>
impl<R: ChainReader> LocalMeshQueryExecutor<R>
Sourcepub fn new(reader: Arc<R>) -> Self
pub fn new(reader: Arc<R>) -> Self
Construct a cache-less local executor. execute_with
silently ignores ExecuteOptions::cache_policy and
ExecuteOptions::bypass_cache in this mode.
Sourcepub fn with_cache(
reader: Arc<R>,
cache: Arc<dyn ResultCache>,
capability_version: Arc<dyn Fn() -> u64 + Send + Sync>,
) -> Self
pub fn with_cache( reader: Arc<R>, cache: Arc<dyn ResultCache>, capability_version: Arc<dyn Fn() -> u64 + Send + Sync>, ) -> Self
Construct a cache-aware local executor. The
capability_version closure is consulted at lookup
time to build the cache key; a divergence between the
stored entry’s version and the live version is a
pull-invalidation miss per the locked Phase F design.
Trait Implementations§
Source§impl<R: ChainReader + 'static> MeshQueryExecutor for LocalMeshQueryExecutor<R>
impl<R: ChainReader + 'static> MeshQueryExecutor for LocalMeshQueryExecutor<R>
Source§fn execute_with<'life0, 'async_trait>(
&'life0 self,
plan: ExecutionPlan,
options: ExecuteOptions,
) -> Pin<Box<dyn Future<Output = Result<RunningQuery, MeshError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute_with<'life0, 'async_trait>(
&'life0 self,
plan: ExecutionPlan,
options: ExecuteOptions,
) -> Pin<Box<dyn Future<Output = Result<RunningQuery, MeshError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
plan with explicit options.
Cache-aware implementors honour ExecuteOptions::bypass_cache
and ExecuteOptions::cache_policy; cache-less ones
silently ignore both.