Struct elipdotter::proximity::ProximateWordItem
source · pub struct ProximateWordItem<'a> {
pub word: &'a Arc<Alphanumeral<StrPtr>>,
pub rating: f32,
}
Expand description
An item of the ProximateWordIter
, returned from proximate_words
.
Fields§
§word: &'a Arc<Alphanumeral<StrPtr>>
The found word.
rating: f32
The word’s likeness. Higher is better.
Implementations§
source§impl<'a> ProximateWordItem<'a>
impl<'a> ProximateWordItem<'a>
sourcepub fn new(item: (&'a Arc<Alphanumeral<StrPtr>>, f32)) -> Self
pub fn new(item: (&'a Arc<Alphanumeral<StrPtr>>, f32)) -> Self
Wrap a new ProximateWordItem
. Works well with Self::into_parts
.
sourcepub fn into_parts(self) -> (&'a Arc<Alphanumeral<StrPtr>>, f32)
pub fn into_parts(self) -> (&'a Arc<Alphanumeral<StrPtr>>, f32)
Turn self
into parts. Works well with Self::new
.
Trait Implementations§
source§impl<'a> Debug for ProximateWordItem<'a>
impl<'a> Debug for ProximateWordItem<'a>
source§impl<'a> PartialEq<ProximateWordItem<'a>> for ProximateWordItem<'a>
impl<'a> PartialEq<ProximateWordItem<'a>> for ProximateWordItem<'a>
source§fn eq(&self, other: &ProximateWordItem<'a>) -> bool
fn eq(&self, other: &ProximateWordItem<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialOrd<ProximateWordItem<'a>> for ProximateWordItem<'a>
impl<'a> PartialOrd<ProximateWordItem<'a>> for ProximateWordItem<'a>
source§fn partial_cmp(&self, other: &ProximateWordItem<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &ProximateWordItem<'a>) -> Option<Ordering>
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