Skip to main content

TextAreaColorStrategy

Trait TextAreaColorStrategy 

Source
pub trait TextAreaColorStrategy: Any {
    // Required methods
    fn highlight(&self, input: TextAreaColorInput<'_>) -> TextAreaColorLines;
    fn as_any(&self) -> &dyn Any;
    fn as_any_mut(&mut self) -> &mut dyn Any;

    // Provided method
    fn cache_key(&self) -> u64 { ... }
}
Expand description

Strategy for applying per-line styling to text content.

Required Methods§

Source

fn highlight(&self, input: TextAreaColorInput<'_>) -> TextAreaColorLines

Return styled spans per logical line.

Source

fn as_any(&self) -> &dyn Any

Downcast support for framework theme integration.

Source

fn as_any_mut(&mut self) -> &mut dyn Any

Mutable downcast support for framework theme integration.

Provided Methods§

Source

fn cache_key(&self) -> u64

Return a stable hash for this strategy’s configuration.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§