Struct elipdotter::proximity::ProximateDocItem
source · pub struct ProximateDocItem<'a> {
pub id: Id,
pub word: &'a Alphanumeral<StrPtr>,
pub rating: f32,
}
Expand description
An item found by ProximateDocIter
, an occurrence of ProximateWordItem
in any of the
documents in the Provider
passed to proximate_word_docs
.
Fields§
§id: Id
Document id
word: &'a Alphanumeral<StrPtr>
word we found
rating: f32
It’s proximity compared to the original. Higher is more similar.
Implementations§
source§impl<'a> ProximateDocItem<'a>
impl<'a> ProximateDocItem<'a>
sourcepub fn new(item: (Id, &'a Alphanumeral<StrPtr>, f32)) -> Self
pub fn new(item: (Id, &'a Alphanumeral<StrPtr>, f32)) -> Self
Wrap a new ProximateDocItem
. Works well with Self::into_parts
.
sourcepub fn into_parts(self) -> (Id, &'a Alphanumeral<StrPtr>, f32)
pub fn into_parts(self) -> (Id, &'a Alphanumeral<StrPtr>, f32)
Turn self
into parts. Works well with Self::new
.
Trait Implementations§
source§impl<'a> Debug for ProximateDocItem<'a>
impl<'a> Debug for ProximateDocItem<'a>
source§impl<'a> Ord for ProximateDocItem<'a>
impl<'a> Ord for ProximateDocItem<'a>
source§impl<'a> PartialEq<ProximateDocItem<'a>> for ProximateDocItem<'a>
impl<'a> PartialEq<ProximateDocItem<'a>> for ProximateDocItem<'a>
source§impl<'a> PartialOrd<ProximateDocItem<'a>> for ProximateDocItem<'a>
impl<'a> PartialOrd<ProximateDocItem<'a>> for ProximateDocItem<'a>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more