pub fn frame_query<V>(
include: Rc<dyn Fn(&Pattern<V>) -> bool>,
base: GraphQuery<V>,
) -> GraphQuery<V>where
V: GraphValue + Clone + 'static,Expand description
Restrict a GraphQuery<V> to elements satisfying include.
The returned GraphQuery<V> is itself a full query interface. All seven
structural invariants are preserved if they hold for base.
query_nodes/query_relationships— filtered by predicatequery_incident_rels(n)— base incident rels where both source AND target satisfy predicatequery_source/query_target— delegated unchanged to basequery_degree(n)— count of filtered incident relsquery_node_by_id(i)— base lookup; returnsNoneif result doesn’t satisfy predicatequery_relationship_by_id(i)— base lookup; returnsNoneif result doesn’t satisfy predicatequery_containers(p)— base containers filtered by predicate
Rc and Arc variants are intentionally separate (no macro): only one is compiled per build, and Rust does not abstract over Rc/Arc here without macros or runtime indirection.