pub struct PreparedCatalogQuery<'query> { /* private fields */ }Expand description
Validated filters and one compiled matcher, prepared without source discovery.
Prepare this borrowed query before creating a system loader when invalid requests must perform no configuration reads. It can be applied repeatedly to the same explicit catalog or passed to a loader without compiling the matcher again. This type neither owns nor refreshes a document snapshot.
Implementations§
Source§impl<'query> PreparedCatalogQuery<'query>
impl<'query> PreparedCatalogQuery<'query>
Sourcepub fn new(query: &'query CatalogQuery) -> Result<Self, CatalogError>
pub fn new(query: &'query CatalogQuery) -> Result<Self, CatalogError>
Validate bounds and compile the optional literal or regular expression.
§Errors
Returns invalid filters, bounds or pattern syntax without source IO.
Sourcepub fn apply(&self, documents: &[AvailableDocument]) -> DocumentCatalog
pub fn apply(&self, documents: &[AvailableDocument]) -> DocumentCatalog
Filter, rank and page an already materialized catalog without IO.
Auto Trait Implementations§
impl<'query> Freeze for PreparedCatalogQuery<'query>
impl<'query> RefUnwindSafe for PreparedCatalogQuery<'query>
impl<'query> Send for PreparedCatalogQuery<'query>
impl<'query> Sync for PreparedCatalogQuery<'query>
impl<'query> Unpin for PreparedCatalogQuery<'query>
impl<'query> UnsafeUnpin for PreparedCatalogQuery<'query>
impl<'query> UnwindSafe for PreparedCatalogQuery<'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