[][src]Struct tantivy::query::ConstScorer

pub struct ConstScorer<TDocSet: DocSet> { /* fields omitted */ }

Wraps a DocSet and simply returns a constant Scorer. The ConstScorer is useful if you have a DocSet where you needed a scorer.

The ConstScorer's constant score can be set by calling .set_score(...).

Methods

impl<TDocSet: DocSet> ConstScorer<TDocSet>[src]

pub fn new(docset: TDocSet) -> ConstScorer<TDocSet>[src]

Creates a new ConstScorer.

pub fn set_score(&mut self, score: Score)[src]

Sets the constant score to a different value.

Trait Implementations

impl<TDocSet: DocSet + 'static> Scorer for ConstScorer<TDocSet>[src]

impl<TDocSet: DocSet> DocSet for ConstScorer<TDocSet>[src]

Auto Trait Implementations

impl<TDocSet> Send for ConstScorer<TDocSet> where
    TDocSet: Send

impl<TDocSet> Sync for ConstScorer<TDocSet> where
    TDocSet: Sync

impl<TDocSet> Unpin for ConstScorer<TDocSet> where
    TDocSet: Unpin

impl<TDocSet> UnwindSafe for ConstScorer<TDocSet> where
    TDocSet: UnwindSafe

impl<TDocSet> RefUnwindSafe for ConstScorer<TDocSet> where
    TDocSet: RefUnwindSafe

Blanket Implementations

impl<T> Fruit for T where
    T: Send + Downcast
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]