pub struct PostingList { /* private fields */ }Expand description
An in-memory posting list for one term.
Implementations§
Source§impl PostingList
impl PostingList
Sourcepub fn document_frequency(&self) -> u32
pub fn document_frequency(&self) -> u32
Returns the number of documents containing the term.
Sourcepub fn push(&mut self, posting: Posting) -> Result<(), PostingsError>
pub fn push(&mut self, posting: Posting) -> Result<(), PostingsError>
Appends one posting.
§Errors
Returns PostingsError when document ids are not strictly
ascending, when positions are not strictly ascending, or when the
term frequency is zero. These are contract violations by the caller,
so they fail loudly rather than being repaired.
Trait Implementations§
Source§impl Clone for PostingList
impl Clone for PostingList
Source§impl Debug for PostingList
impl Debug for PostingList
Source§impl Default for PostingList
impl Default for PostingList
impl Eq for PostingList
Source§impl PartialEq for PostingList
impl PartialEq for PostingList
impl StructuralPartialEq for PostingList
Auto Trait Implementations§
impl Freeze for PostingList
impl RefUnwindSafe for PostingList
impl Send for PostingList
impl Sync for PostingList
impl Unpin for PostingList
impl UnsafeUnpin for PostingList
impl UnwindSafe for PostingList
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