pub struct DocSet { /* private fields */ }Expand description
A finite set of document ids stored in ascending order.
The explicit universe passed to Self::complement determines the finite
Boolean algebra in which a complement is evaluated.
Implementations§
Source§impl DocSet
impl DocSet
Sourcepub fn from_unsorted(doc_ids: Vec<DocId>) -> Self
pub fn from_unsorted(doc_ids: Vec<DocId>) -> Self
Construct a document set from ids in arbitrary order.
Sourcepub fn difference(&self, other: &Self) -> Self
pub fn difference(&self, other: &Self) -> Self
Set difference, self \\ other.
Sourcepub fn complement(&self, universe: &Self) -> Self
pub fn complement(&self, universe: &Self) -> Self
Complement relative to an explicit finite universe.
Sourcepub fn iter(
&self,
) -> impl ExactSizeIterator<Item = DocId> + DoubleEndedIterator + '_
pub fn iter( &self, ) -> impl ExactSizeIterator<Item = DocId> + DoubleEndedIterator + '_
Iterate over document ids in ascending order.
Trait Implementations§
impl Eq for DocSet
Source§impl From<&DocSet> for PostingList
impl From<&DocSet> for PostingList
Source§impl From<&PostingList> for DocSet
impl From<&PostingList> for DocSet
Source§fn from(posting_list: &PostingList) -> Self
fn from(posting_list: &PostingList) -> Self
Converts to this type from the input type.
Source§impl From<DocSet> for PostingList
impl From<DocSet> for PostingList
Source§impl FromIterator<u64> for DocSet
impl FromIterator<u64> for DocSet
Source§impl IntoIterator for DocSet
impl IntoIterator for DocSet
Source§impl<'a> IntoIterator for &'a DocSet
impl<'a> IntoIterator for &'a DocSet
Source§impl Ord for DocSet
impl Ord for DocSet
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for DocSet
impl PartialOrd for DocSet
impl StructuralPartialEq for DocSet
Auto Trait Implementations§
impl Freeze for DocSet
impl RefUnwindSafe for DocSet
impl Send for DocSet
impl Sync for DocSet
impl Unpin for DocSet
impl UnsafeUnpin for DocSet
impl UnwindSafe for DocSet
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