pub struct AplRouteHandler { /* private fields */ }Expand description
Synthetic plugin that drives APL evaluation for one route + one phase.
Implements Plugin (so cpex-core treats it like any other plugin —
mode/capabilities/on_error come from the PluginConfig the visitor
supplied at annotate_route time) and AnyHookHandler (so the
executor dispatches into it through the normal type-erased path).
Implementations§
Source§impl AplRouteHandler
impl AplRouteHandler
Sourcepub fn new(
config: PluginConfig,
route: Arc<CompiledRoute>,
phase: Phase,
plugin_registry: Arc<PluginRegistry>,
dispatch_cache: Arc<DispatchCache>,
session_store: Arc<dyn SessionStore>,
manager: Weak<PluginManager>,
) -> Self
pub fn new( config: PluginConfig, route: Arc<CompiledRoute>, phase: Phase, plugin_registry: Arc<PluginRegistry>, dispatch_cache: Arc<DispatchCache>, session_store: Arc<dyn SessionStore>, manager: Weak<PluginManager>, ) -> Self
Build a handler. Visitor calls this twice per route — once for
each phase — and passes the resulting Arc to annotate_route.
Sourcepub fn with_pdp(self, pdp: Arc<dyn PdpResolver>) -> Self
pub fn with_pdp(self, pdp: Arc<dyn PdpResolver>) -> Self
Install a PdpResolver. Pass a PdpRouter when the host needs
to support multiple dialects (Cedar + OPA + NeMo) on the same
route — the router dispatches each pdp(...) step by dialect.
Pass a single resolver when only one dialect is in use; APL
steps for any other dialect will then return
PdpError::NoResolver at evaluation time.
Sourcepub fn with_pdp_router(
self,
resolvers: impl IntoIterator<Item = Arc<dyn PdpResolver>>,
) -> Self
pub fn with_pdp_router( self, resolvers: impl IntoIterator<Item = Arc<dyn PdpResolver>>, ) -> Self
Sugar for the common “register many resolvers” path. Builds a
PdpRouter, registers each resolver into it, then installs the
router. Equivalent to constructing a PdpRouter by hand and
passing it to Self::with_pdp.