Trait move_bytecode_viewer::interfaces::LeftScreen
source · [−]pub trait LeftScreen {
type SourceIndex;
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
type SourceIndex
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
fn get_source_index_for_line(
&self,
line: usize,
column: usize
) -> Option<&Self::SourceIndex>
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.
fn backing_string(&self) -> String
fn backing_string(&self) -> String
Return the backing string to be displayed on the left screen.