Enum public_api::tokens::Token
source · pub enum Token {
}
Expand description
A token in a rendered PublicItem
, used to apply syntax colouring 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
sourceimpl Ord for Token
impl Ord for Token
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Token> for Token
impl PartialOrd<Token> for Token
sourcefn partial_cmp(&self, other: &Token) -> Option<Ordering>
fn partial_cmp(&self, other: &Token) -> Option<Ordering>
1.0.0 · sourcefn 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 StructuralEq for Token
impl StructuralPartialEq for Token
Auto Trait Implementations
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more