Struct elipdotter::query::Query
source · [−]pub struct Query { /* private fields */ }
Expand description
A query.
This is just a root Part
.
Use parse
to create one.
You can also use the std::str::FromStr
implementation.
Implementations
sourceimpl Query
impl Query
pub fn documents<'a, 'b, P: Provider<'a>>(
&'b self,
provider: &'a P
) -> Documents<'a, 'b, P>
sourcepub fn occurrences<'a>(
&'a self,
provider: &'a impl OccurenceProvider<'a>,
distance_threshold: usize
) -> Result<impl Iterator<Item = Hit> + 'a, IterError>
pub fn occurrences<'a>(
&'a self,
provider: &'a impl OccurenceProvider<'a>,
distance_threshold: usize
) -> Result<impl Iterator<Item = Hit> + 'a, IterError>
The distance_threshold
is the bytes between two occurrences to consider the “same”, which
increases Hit::rating
.
Errors
See Self::documents
.
Panics
Some implementations of index::OccurenceProvider
panic under certain circumstances.
index::SimpleOccurences
, for example, panics if you haven’t supplied all the necessary
documents.
Trait Implementations
impl Eq for Query
impl StructuralEq for Query
impl StructuralPartialEq for Query
Auto Trait Implementations
impl RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl UnwindSafe for Query
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more