pub enum TokenCategory {
Quantifier,
Noun,
Verb,
Adjective,
Connective,
Determiner,
Preposition,
Pronoun,
Modal,
Punctuation,
Proper,
Other,
}Expand description
Syntactic category of a token for UI highlighting.
Variants§
Quantifier
Universal/existential quantifiers: every, some, no, most
Noun
Common nouns: dog, cat, person
Verb
Main verbs: runs, loves, gives
Adjective
Adjective modifiers: tall, happy, red
Connective
Logical connectives: and, or, not, if
Determiner
Articles and determiners: a, an, the
Preposition
Prepositional words: in, on, to, with
Pronoun
Personal and relative pronouns: he, she, who
Modal
Modal auxiliaries: can, must, might
Punctuation
Sentence-ending punctuation
Proper
Proper names (capitalized)
Other
Uncategorized tokens
Trait Implementations§
Source§impl Clone for TokenCategory
impl Clone for TokenCategory
Source§fn clone(&self) -> TokenCategory
fn clone(&self) -> TokenCategory
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TokenCategory
impl Debug for TokenCategory
Source§impl<'de> Deserialize<'de> for TokenCategory
impl<'de> Deserialize<'de> for TokenCategory
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 PartialEq for TokenCategory
impl PartialEq for TokenCategory
Source§fn eq(&self, other: &TokenCategory) -> bool
fn eq(&self, other: &TokenCategory) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TokenCategory
impl Serialize for TokenCategory
impl StructuralPartialEq for TokenCategory
Auto Trait Implementations§
impl Freeze for TokenCategory
impl RefUnwindSafe for TokenCategory
impl Send for TokenCategory
impl Sync for TokenCategory
impl Unpin for TokenCategory
impl UnsafeUnpin for TokenCategory
impl UnwindSafe for TokenCategory
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.