pub struct Query { /* private fields */ }Expand description
One fixed-stage query. Empty text selects and emits the original document.
Implementations§
Source§impl Query
impl Query
pub fn parse(expression: &str, limits: Limits) -> Result<Self, QueryError>
pub fn is_editing(&self) -> bool
pub fn requires_model_facts(&self) -> bool
pub fn evaluate<'a>( &self, input: &'a Input, limits: Limits, ) -> Result<QueryResult<'a>, QueryError>
Sourcepub fn evaluate_with_facts<'a>(
&self,
input: &'a Input,
facts: Rc<ModelFacts<'a>>,
limits: Limits,
) -> Result<QueryResult<'a>, QueryError>
pub fn evaluate_with_facts<'a>( &self, input: &'a Input, facts: Rc<ModelFacts<'a>>, limits: Limits, ) -> Result<QueryResult<'a>, QueryError>
Evaluate against reusable root-local facts. The returned semantic result retains the owner; each evaluation still charges its own scan and output.
Sourcepub fn evaluate_with_model<'a>(
&self,
input: &'a Input,
model: Option<&'a ModelContext>,
limits: Limits,
) -> Result<QueryResult<'a>, QueryError>
pub fn evaluate_with_model<'a>( &self, input: &'a Input, model: Option<&'a ModelContext>, limits: Limits, ) -> Result<QueryResult<'a>, QueryError>
Semantic inspection borrows the supplied model and requires exact root bytes. Enum reduction keeps its separate optional data/model interpretation contract.
Trait Implementations§
Auto Trait Implementations§
impl !Send for Query
impl !Sync for Query
impl Freeze for Query
impl RefUnwindSafe for Query
impl Unpin for Query
impl UnsafeUnpin for Query
impl UnwindSafe for Query
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