Crate rustdoc_highlight [−] [src]
Basic syntax highlighting functionality.
This module uses libsyntax's lexer to provide token-based highlighting for the HTML documentation generated by rustdoc.
If you just want to syntax highlighting for a Rust program, then you can use
the render_inner_with_highlighting or render_with_highlighting
functions. For more advanced use cases (if you want to supply your own css
classes or control how the HTML is generated, or even generate something
other then HTML), then you should implement the Writer trait and use a
Classifier.
Structs
| Classifier |
Processes a program (nested in the internal |
Enums
| Class |
How a span of text is classified. Mostly corresponds to token kinds. |
Traits
| Writer |
Trait that controls writing the output of syntax highlighting. Users should implement this trait to customise writing output. |
Functions
| render_inner_with_highlighting |
Highlights |
| render_with_highlighting |
Highlights |