Skip to main content

Colorizer

Trait Colorizer 

Source
pub trait Colorizer {
Show 32 methods // Required method fn colorize<S>(&self, el: LanguageElement, value: S) -> String where S: AsRef<str>; // Provided methods fn comment<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn constant<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn constant_definition<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn embedded<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn error<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn function<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn function_call<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn function_definition<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn keyword<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn boolean<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn number<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn string<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn string_special<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn url<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn operator<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn method<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn method_definition<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn module<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn module_definition<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn property<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn property_definitions<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn punctuation<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn bracket<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn delimiter<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn separator<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn type_ref<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn type_builtin<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn type_definition<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn variable<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn variable_field<S>(&self, value: S) -> String where S: AsRef<str> { ... } fn variable_parameter<S>(&self, value: S) -> String where S: AsRef<str> { ... }
}
Expand description

This trait is implemented by format-specific providers.

Required Methods§

Source

fn colorize<S>(&self, el: LanguageElement, value: S) -> String
where S: AsRef<str>,

Colorize the value according to the language element type el.

Provided Methods§

Source

fn comment<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn constant<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn constant_definition<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn embedded<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn error<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn function<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn function_call<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn function_definition<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn keyword<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn boolean<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn number<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn string<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn string_special<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn url<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn operator<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn method<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn method_definition<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn module<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn module_definition<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn property<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn property_definitions<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn punctuation<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn bracket<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn delimiter<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn separator<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn type_ref<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn type_builtin<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn type_definition<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn variable<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn variable_field<S>(&self, value: S) -> String
where S: AsRef<str>,

Source

fn variable_parameter<S>(&self, value: S) -> String
where S: AsRef<str>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§