pub struct Glossary {
pub terms: Vec<GlossaryTerm>,
}Expand description
A glossary containing term definitions.
Fields§
§terms: Vec<GlossaryTerm>Glossary terms.
Implementations§
Source§impl Glossary
impl Glossary
Sourcepub fn add_term(&mut self, term: GlossaryTerm)
pub fn add_term(&mut self, term: GlossaryTerm)
Add a term.
Sourcepub fn get(&self, id: &str) -> Option<&GlossaryTerm>
pub fn get(&self, id: &str) -> Option<&GlossaryTerm>
Find a term by its ID.
Sourcepub fn find_by_text(&self, text: &str) -> Option<&GlossaryTerm>
pub fn find_by_text(&self, text: &str) -> Option<&GlossaryTerm>
Find terms by text (case-insensitive).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Glossary
impl<'de> Deserialize<'de> for Glossary
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
impl Eq for Glossary
impl StructuralPartialEq for Glossary
Auto Trait Implementations§
impl Freeze for Glossary
impl RefUnwindSafe for Glossary
impl Send for Glossary
impl Sync for Glossary
impl Unpin for Glossary
impl UnsafeUnpin for Glossary
impl UnwindSafe for Glossary
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
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.