pub trait LeftScreen {
    type SourceIndex;

    // Required methods
    fn get_source_index_for_line(
        &self,
        line: usize,
        column: usize
    ) -> Option<&Self::SourceIndex>;
    fn backing_string(&self) -> String;
}
Expand description

The LeftScreen trait is used to index the code.

Required Associated Types§

source

type SourceIndex

This is the type used for indexing the source code in the RightScreen trait. e.g., for bytecode and using the source map, this would be a tuple of (FunctionDefinitionIndex, CodeOffset).

Required Methods§

source

fn get_source_index_for_line( &self, line: usize, column: usize ) -> Option<&Self::SourceIndex>

Given a line and the column within that line, this returns a SourceIndex to be used by the RightScreen trait.

source

fn backing_string(&self) -> String

Return the backing string to be displayed on the left screen.

Implementors§