enum Class {
Show 17 variants Comment, DocComment, Attribute, KeyWord, RefKeyWord, Self_(Span), Macro(Span), MacroNonTerminal, String, Number, Bool, Ident(Span), Lifetime, PreludeTy, PreludeVal, QuestionMark, Decoration(&'static str),
}
Expand description

How a span of text is classified. Mostly corresponds to token kinds.

Variants

Comment

DocComment

Attribute

KeyWord

RefKeyWord

Keywords that do pointer/reference stuff.

Self_(Span)

Macro(Span)

MacroNonTerminal

String

Number

Bool

Ident(Span)

Ident isn’t rendered in the HTML but we still need it for the Span it contains.

Lifetime

PreludeTy

PreludeVal

QuestionMark

Decoration(&'static str)

Implementations

It is only looking at the variant, not the variant content.

It is used mostly to group multiple similar HTML elements into one <span> instead of multiple ones.

If self contains a Span, it’ll be replaced with DUMMY_SP to prevent creating links on “empty content” (because of the attributes merge).

Returns the css class expected by rustdoc for each Class.

In case this is an item which can be converted into a link to a definition, it’ll contain a “span” (a tuple representing (lo, hi) equivalent of Span).

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

Layout

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 24 bytes

Size for each variant:

  • Comment: 0 bytes
  • DocComment: 0 bytes
  • Attribute: 0 bytes
  • KeyWord: 0 bytes
  • RefKeyWord: 0 bytes
  • Self_: 8 bytes
  • Macro: 8 bytes
  • MacroNonTerminal: 0 bytes
  • String: 0 bytes
  • Number: 0 bytes
  • Bool: 0 bytes
  • Ident: 8 bytes
  • Lifetime: 0 bytes
  • PreludeTy: 0 bytes
  • PreludeVal: 0 bytes
  • QuestionMark: 0 bytes
  • Decoration: 20 bytes