pub struct OpPlan {
pub ops: Vec<Op>,
}Expand description
Sequential pipeline of ops. The first op produces an initial state
(no input bitmap; ops at position 0 run with a universal “all” state
so loaders fold via AND). Build via the fluent API; finalise with
optimize() then run().
Fields§
§ops: Vec<Op>Ops applied in document order. Public so callers can introspect the optimiser’s output for testing / debugging.
Implementations§
Source§impl OpPlan
impl OpPlan
Sourcepub fn anchor(self, root: TokenId) -> Self
pub fn anchor(self, root: TokenId) -> Self
Anchor the plan at a single token (typically the root or a result from a prior subquery).
Sourcepub fn by_key(self, name: &str) -> Self
pub fn by_key(self, name: &str) -> Self
Restrict to tokens that are object keys with the given name.
Sourcepub fn within(self, root: TokenId) -> Self
pub fn within(self, root: TokenId) -> Self
Restrict to tokens inside the subtree rooted at root.
Sourcepub fn field(self, name: &str) -> Self
pub fn field(self, name: &str) -> Self
Drill into the named field — for each container in state, take the value bound to that key.
Sourcepub fn value_eq(self, lit: &[u8]) -> Self
pub fn value_eq(self, lit: &[u8]) -> Self
Filter state to tokens whose byte span equals lit (string-aware).
Sourcepub fn run(&self, idx: &StructuralIndex, bytes: &[u8]) -> Bitmap
pub fn run(&self, idx: &StructuralIndex, bytes: &[u8]) -> Bitmap
Run the plan against a StructuralIndex + bytes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OpPlan
impl RefUnwindSafe for OpPlan
impl Send for OpPlan
impl Sync for OpPlan
impl Unpin for OpPlan
impl UnsafeUnpin for OpPlan
impl UnwindSafe for OpPlan
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more