pub struct Filter<'a> {
pub field: usize,
pub test: &'a dyn Fn(&[u8]) -> bool,
}Expand description
A non-scoring predicate over a document’s stored values.
The test takes raw bytes because this crate does not know what a number or a date is; the caller coerces. A document with no value for the field never passes — absent is not a value.
Fields§
§field: usizeWhich declared value field the predicate reads.
test: &'a dyn Fn(&[u8]) -> boolThe test applied to that field’s bytes.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Filter<'a>
impl<'a> !Send for Filter<'a>
impl<'a> !Sync for Filter<'a>
impl<'a> !UnwindSafe for Filter<'a>
impl<'a> Freeze for Filter<'a>
impl<'a> Unpin for Filter<'a>
impl<'a> UnsafeUnpin for Filter<'a>
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