pub struct PreparedQueryRequest<'request> { /* private fields */ }Expand description
A complete request validated without loading documents or capturing a snapshot.
The request and policy remain bound for this value’s lifetime. Preparation does not cache a search matcher: pure query APIs retain their own validation.
Implementations§
Source§impl<'request> PreparedQueryRequest<'request>
impl<'request> PreparedQueryRequest<'request>
Sourcepub fn new(
request: &'request QueryRequest,
policy: LoadPolicy,
) -> Result<Self, QueryError>
pub fn new( request: &'request QueryRequest, policy: LoadPolicy, ) -> Result<Self, QueryError>
Validate both source selection and the requested view before local IO.
§Errors
Returns the same loading-selection or view errors as complete execution.
Sourcepub const fn request(&self) -> &'request QueryRequest
pub const fn request(&self) -> &'request QueryRequest
The immutable request whose input and view were validated together.
Sourcepub const fn policy(&self) -> LoadPolicy
pub const fn policy(&self) -> LoadPolicy
The source-selection policy included in validation.
Sourcepub fn resolve(
&self,
resolver: &DocumentResolver,
) -> Result<ResolvedContent, QueryError>
pub fn resolve( &self, resolver: &DocumentResolver, ) -> Result<ResolvedContent, QueryError>
Resolve against an explicit snapshot without repeating request validation.
§Errors
Returns a source-loading failure.
Sourcepub fn execute(
&self,
resolver: &DocumentResolver,
) -> Result<QueryViewResult, QueryExecutionError>
pub fn execute( &self, resolver: &DocumentResolver, ) -> Result<QueryViewResult, QueryExecutionError>
Execute the shared complete-request pipeline against an explicit snapshot.
§Errors
Returns loading, projection or pure query execution failure.
Auto Trait Implementations§
impl<'request> Freeze for PreparedQueryRequest<'request>
impl<'request> RefUnwindSafe for PreparedQueryRequest<'request>
impl<'request> Send for PreparedQueryRequest<'request>
impl<'request> Sync for PreparedQueryRequest<'request>
impl<'request> Unpin for PreparedQueryRequest<'request>
impl<'request> UnsafeUnpin for PreparedQueryRequest<'request>
impl<'request> UnwindSafe for PreparedQueryRequest<'request>
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