pub struct ManyQuery<V, F>where
F: Convert<V>,{ /* private fields */ }Expand description
A query that expects many items as a result.
Construct this using Queries::many.
The items are converted into Rust values using the supplied convert function.
This is useful if you expect many items to be returned from an XPath query.
The result is converted into a Rust value using the convert function
when constructing this query.
Trait Implementations§
Source§impl<V, F> Query<Vec<V>> for ManyQuery<V, F>where
F: Convert<V>,
impl<V, F> Query<Vec<V>> for ManyQuery<V, F>where
F: Convert<V>,
Source§fn execute_with_context(
&self,
document: &mut Documents,
context: &DynamicContext<'_>,
) -> Result<Vec<V>>
fn execute_with_context( &self, document: &mut Documents, context: &DynamicContext<'_>, ) -> Result<Vec<V>>
Execute the query against a dynamic context Read more
Source§fn static_context(&self) -> &StaticContext
fn static_context(&self) -> &StaticContext
Get the static context for the query.
Source§fn dynamic_context_builder(
&self,
documents: &Documents,
) -> DynamicContextBuilder<'_>
fn dynamic_context_builder( &self, documents: &Documents, ) -> DynamicContextBuilder<'_>
Get a dynamic context builder for the query, configured with the
query’s static context and the document’s documents. Read more
Source§fn map<T, F>(self, f: F) -> MapQuery<V, T, Self, F>
fn map<T, F>(self, f: F) -> MapQuery<V, T, Self, F>
Map the the result of the query to a different type. Read more
Source§fn execute(&self, documents: &mut Documents, item: impl Itemable) -> Result<V>
fn execute(&self, documents: &mut Documents, item: impl Itemable) -> Result<V>
Excute the query against an itemable
Source§fn execute_build_context(
&self,
documents: &mut Documents,
build: impl FnOnce(&mut DynamicContextBuilder<'_>),
) -> Result<V>
fn execute_build_context( &self, documents: &mut Documents, build: impl FnOnce(&mut DynamicContextBuilder<'_>), ) -> Result<V>
Execute a query with a specific dynamic context. Read more
Auto Trait Implementations§
impl<V, F> Freeze for ManyQuery<V, F>where
F: Freeze,
impl<V, F> !RefUnwindSafe for ManyQuery<V, F>
impl<V, F> !Send for ManyQuery<V, F>
impl<V, F> !Sync for ManyQuery<V, F>
impl<V, F> Unpin for ManyQuery<V, F>
impl<V, F> !UnwindSafe for ManyQuery<V, F>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more