pub struct Distinct<'a> {
pub field: usize,
pub key: &'a dyn Fn(&[u8]) -> Option<Vec<u8>>,
}Expand description
Collapse the page so only the best document per value of a stored field appears.
The key is the value’s identity, coerced — so 1 and 1.0 in a
field declared f64 are one value rather than two. A document with no
value for the field is its own group: DISTINCT removes documents
shown to share a value, and one that has none has not been shown to
share anything.
Fields§
§field: usizeWhich declared value field identifies a group.
key: &'a dyn Fn(&[u8]) -> Option<Vec<u8>>The identity of one stored value.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Distinct<'a>
impl<'a> !Send for Distinct<'a>
impl<'a> !Sync for Distinct<'a>
impl<'a> !UnwindSafe for Distinct<'a>
impl<'a> Freeze for Distinct<'a>
impl<'a> Unpin for Distinct<'a>
impl<'a> UnsafeUnpin for Distinct<'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