Skip to main content

StyleResolver

Trait StyleResolver 

Source
pub trait StyleResolver {
    // Required method
    fn resolve(&self, style_id: u32) -> Style;
}
Expand description

Resolves an opaque crate::Span::style id to a real ratatui style. The buffer doesn’t know about colours; the host (sqeel-vim or any future user) keeps a lookup table.

Required Methods§

Source

fn resolve(&self, style_id: u32) -> Style

Implementors§

Source§

impl<F: Fn(u32) -> Style> StyleResolver for F

Convenience impl so simple closures can drive the renderer.