Struct move_bytecode_viewer::interfaces::SourceContext
source · pub struct SourceContext {
pub left: String,
pub highlight: String,
pub remainder: String,
}
Expand description
There are two interfaces–the LeftScreen
and RightScreen
–that need to be implemented for
the bytecode viewer and these can be mix-and-matched for different implementations.
The LeftScreen
is the text that is displayed in the left-hand screen, and is scrollable. The
scrolling in this window will output BytecodeInfo
objects. These objects are then consumed by
the RightScreen
source_for_code_location
function, which outputs text containing a context
(left
, remainder
) around the source code location identified by the passed in
BytecodeInfo
.
Fields§
§left: String
§highlight: String
§remainder: String
Trait Implementations§
source§impl Clone for SourceContext
impl Clone for SourceContext
source§fn clone(&self) -> SourceContext
fn clone(&self) -> SourceContext
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more