pub struct Thesaurus { /* private fields */ }Expand description
A thesaurus is a dictionary with synonyms which map to upper-level concepts.
Implementations§
Source§impl Thesaurus
impl Thesaurus
Sourcepub fn insert(&mut self, key: NormalizedTermValue, value: NormalizedTerm)
pub fn insert(&mut self, key: NormalizedTermValue, value: NormalizedTerm)
Inserts a key-value pair into the thesaurus.
Sourcepub fn get(&self, key: &NormalizedTermValue) -> Option<&NormalizedTerm>
pub fn get(&self, key: &NormalizedTermValue) -> Option<&NormalizedTerm>
Custom get method for the thesaurus, which accepts a
NormalizedTermValue and returns a reference to the
NormalizedTerm.
pub fn keys(&self) -> Keys<'_, NormalizedTermValue, NormalizedTerm>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Thesaurus
impl<'de> Deserialize<'de> for Thesaurus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> IntoIterator for &'a Thesaurus
impl<'a> IntoIterator for &'a Thesaurus
Source§type Item = (&'a NormalizedTermValue, &'a NormalizedTerm)
type Item = (&'a NormalizedTermValue, &'a NormalizedTerm)
The type of the elements being iterated over.
Source§type IntoIter = Iter<'a, NormalizedTermValue, NormalizedTerm>
type IntoIter = Iter<'a, NormalizedTermValue, NormalizedTerm>
Which kind of iterator are we turning this into?
impl Eq for Thesaurus
impl StructuralPartialEq for Thesaurus
Auto Trait Implementations§
impl Freeze for Thesaurus
impl RefUnwindSafe for Thesaurus
impl Send for Thesaurus
impl Sync for Thesaurus
impl Unpin for Thesaurus
impl UnwindSafe for Thesaurus
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