2019-06-04 09:09:58 +00:00
|
|
|
use pyo3::prelude::*;
|
2019-08-02 11:23:10 +00:00
|
|
|
use pyo3::PyObjectProtocol;
|
2019-06-04 09:09:58 +00:00
|
|
|
use tantivy as tv;
|
|
|
|
|
|
|
|
/// Tantivy's Query
|
|
|
|
#[pyclass]
|
|
|
|
pub(crate) struct Query {
|
|
|
|
pub(crate) inner: Box<dyn tv::query::Query>,
|
|
|
|
}
|
|
|
|
|
2019-08-02 11:23:10 +00:00
|
|
|
#[pyproto]
|
|
|
|
impl PyObjectProtocol for Query {
|
|
|
|
fn __repr__(&self) -> PyResult<String> {
|
|
|
|
Ok(format!("Query({:?})", self.inner))
|
2019-06-04 09:09:58 +00:00
|
|
|
}
|
|
|
|
}
|