Skip to main content

PreparedQueryRequest

Struct PreparedQueryRequest 

Source
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>

Source

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.

Source

pub const fn request(&self) -> &'request QueryRequest

The immutable request whose input and view were validated together.

Source

pub const fn policy(&self) -> LoadPolicy

The source-selection policy included in validation.

Source

pub fn resolve( &self, resolver: &DocumentResolver, ) -> Result<ResolvedContent, QueryError>

Resolve against an explicit snapshot without repeating request validation.

§Errors

Returns a source-loading failure.

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.