Enum public_api::tokens::Token
source · 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 PartialEq for Token
impl PartialEq for Token
source§impl PartialOrd for Token
impl PartialOrd for Token
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)