Function rustdoc::html::highlight::string[−][src]

fn string<T: Display>(out: &mut Buffer, text: T, klass: Option<Class>)

Called for a span of text. If the text should be highlighted differently from the surrounding text, then the Class argument will be a value other than None.

The following sequences of callbacks are equivalent:

    enter_span(Foo), string("text", None), exit_span()
    string("text", Foo)

The latter can be thought of as a shorthand for the former, which is more flexible.