pub struct Query<'a, 'b> { /* private fields */ }
Expand description
A builder for a ReaderIter
to iterate over entries in the database matching a given pattern.
Implementations§
Source§impl<'a, 'b> Query<'a, 'b>
impl<'a, 'b> Query<'a, 'b>
Sourcepub fn hash(self, hash: Option<String>) -> Query<'a, 'b>
pub fn hash(self, hash: Option<String>) -> Query<'a, 'b>
Limit results to entries from the package with the specified hash if Some
.
Sourcepub fn package_pattern(
self,
package_pattern: Option<&'b Regex>,
) -> Query<'a, 'b>
pub fn package_pattern( self, package_pattern: Option<&'b Regex>, ) -> Query<'a, 'b>
Limit results to entries from packages whose name matches the given regex if Some
.
Sourcepub fn run(self) -> Result<ReaderIter<'a, 'b>>
pub fn run(self) -> Result<ReaderIter<'a, 'b>>
Runs the query, returning an Iterator that will yield all entries matching the conditions.
There is no guarantee about the order of the returned matches.
Auto Trait Implementations§
impl<'a, 'b> Freeze for Query<'a, 'b>
impl<'a, 'b> RefUnwindSafe for Query<'a, 'b>
impl<'a, 'b> Send for Query<'a, 'b>
impl<'a, 'b> !Sync for Query<'a, 'b>
impl<'a, 'b> Unpin for Query<'a, 'b>
impl<'a, 'b> UnwindSafe for Query<'a, 'b>
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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