#[non_exhaustive]pub struct Alternatives {
pub range: Range<usize>,
pub concept_id: u64,
pub matched: NormalizedTermValue,
pub alternatives: Vec<String>,
}Expand description
The alternatives for the concept matched at a text position.
Non-exhaustive so fields can be added without a breaking release; it is
only ever constructed by alternatives_in and alternatives_at.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.range: Range<usize>Byte range of the matched span in the searched text.
concept_id: u64Id of the matched concept.
matched: NormalizedTermValueThe thesaurus key that matched (normalised form of the span).
alternatives: Vec<String>Replacement text for each other term of the concept, in
ConceptIndex::synonyms_of order with the matched term removed.
The concept name uses its display form (ConceptIndex::display_name),
so acronyms and proper nouns keep their case; synonyms are normalised
because a thesaurus records no per-synonym display form. Empty for a
single-term concept.
Trait Implementations§
Source§impl Clone for Alternatives
impl Clone for Alternatives
Source§impl Debug for Alternatives
impl Debug for Alternatives
impl Eq for Alternatives
Source§impl PartialEq for Alternatives
impl PartialEq for Alternatives
impl StructuralPartialEq for Alternatives
Auto Trait Implementations§
impl Freeze for Alternatives
impl RefUnwindSafe for Alternatives
impl Send for Alternatives
impl Sync for Alternatives
impl Unpin for Alternatives
impl UnsafeUnpin for Alternatives
impl UnwindSafe for Alternatives
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.