Skip to main content

LineFontSizeProvider

Trait LineFontSizeProvider 

Source
pub trait LineFontSizeProvider {
    // Required methods
    fn font_size(&self, line: usize) -> usize;
    fn cache_id(&self) -> u64;
}

Required Methods§

Source

fn font_size(&self, line: usize) -> usize

Get the ‘general’ font size for a specific buffer line.

This is typically the editor font size.

There might be alternate font-sizes within the line, like for phantom text, but those are not considered here.

Source

fn cache_id(&self) -> u64

An identifier used to mark when the font size info has changed.

This lets us update information.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§