Skip to main content

DisplayMap

Trait DisplayMap 

Source
pub trait DisplayMap {
    // Required methods
    fn row_count(&self, line_count: usize) -> usize;
    fn line_to_row(&self, line: usize) -> usize;
    fn row_to_line(&self, row: usize) -> Option<usize>;
}
Expand description

Maps document lines to display rows. Views never assume line N is row N; word wrap and diff alignment will provide other implementations.

Required Methods§

Source

fn row_count(&self, line_count: usize) -> usize

Source

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

Source

fn row_to_line(&self, row: usize) -> Option<usize>

The document line shown on row, or None for a filler row.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§