pub enum Token {
}
Expand description
A token in a rendered PublicItem
, used to apply syntax coloring in downstream applications.
Variants§
Symbol(String)
A symbol, like =
or ::<
Qualifier(String)
A qualifier, like pub
or const
Kind(String)
The kind of an item, like function
or trait
Whitespace
Whitespace, a single space
Identifier(String)
An identifier, like variable names or parts of the path of an item
Annotation(String)
An annotation, used e.g. for Rust attributes.
Self_(String)
The identifier self, the text can be self
or Self
Function(String)
The identifier for a function, like fn_arg
in comprehensive_api::functions::fn_arg
Lifetime(String)
A lifetime including the apostrophe '
, like 'a
Keyword(String)
A keyword, like impl
, where
, or dyn
Generic(String)
A generic parameter, like T
Primitive(String)
A primitive type, like usize
Type(String)
A non-primitive type, like the name of a struct or a trait
Implementations§
Trait Implementations§
Source§impl Ord for Token
impl Ord for Token
Source§impl PartialOrd for Token
impl PartialOrd for Token
impl Eq for Token
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
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