RSet

Struct RSet 

Source
pub struct RSet(/* private fields */);
Expand description

An RSet is used to hold documents marked as explicitly relevant to the current search

Useful for generating MSet and ESet instances

Implementations§

Source§

impl RSet

Source

pub fn add_document(&mut self, it: impl AsRef<MSetIterator>)

Add a document to this reference set by way of a Match

Source

pub fn add_document_by_id(&mut self, id: impl Into<c_uint>)

Add a document to this reference set by way of a DocId

Source

pub fn contains(&self, it: impl AsRef<MSetIterator>) -> bool

Returns true if this RSet contains the document specified by the given Match

Source

pub fn contains_id(&self, id: impl Into<c_uint>) -> bool

Returns true if this RSet contains the document specified by the given id

Source

pub fn empty(&self) -> bool

Returns true if this RSet is empty

Source

pub fn remove_document(&mut self, it: impl AsRef<MSetIterator>)

Remove the document specified by the given Match from this RSet

Source

pub fn remove_document_by_id(&mut self, id: impl Into<c_uint>)

Remove the document specified by the given DocId from this RSet

Source

pub fn size(&self) -> u32

Return the size of this RSet

Trait Implementations§

Source§

impl Default for RSet

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl FromIterator<DocId> for RSet

Source§

fn from_iter<T: IntoIterator<Item = DocId>>(iter: T) -> Self

Creates a value from an iterator. Read more
Source§

impl FromIterator<Match> for RSet

Source§

fn from_iter<T: IntoIterator<Item = Match>>(iter: T) -> Self

Creates a value from an iterator. Read more

Auto Trait Implementations§

§

impl Freeze for RSet

§

impl !RefUnwindSafe for RSet

§

impl !Send for RSet

§

impl !Sync for RSet

§

impl Unpin for RSet

§

impl UnwindSafe for RSet

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.