Skip to main content

PaneEntry

Trait PaneEntry 

Source
pub trait PaneEntry {
    // Required method
    fn display_text(&self) -> &str;

    // Provided methods
    fn prefix(&self) -> Option<(&str, Style)> { ... }
    fn text_style(&self) -> Style { ... }
}
Expand description

Trait for items that can be displayed inside a ScrollablePane.

Required Methods§

Source

fn display_text(&self) -> &str

The main text content of this entry.

Provided Methods§

Source

fn prefix(&self) -> Option<(&str, Style)>

An optional styled prefix rendered before the display text.

Return Some(("prefix ", style)) to prepend a label such as [INFO].

Source

fn text_style(&self) -> Style

Style applied to the display text returned by display_text.

Implementors§