pub struct BytecodeViewer<'a> {
pub lines: Vec<String>,
pub view: BinaryIndexedView<'a>,
pub line_map: HashMap<usize, BytecodeInfo>,
}Fields
lines: Vec<String>view: BinaryIndexedView<'a>line_map: HashMap<usize, BytecodeInfo>Implementations
sourceimpl<'a> BytecodeViewer<'a>
impl<'a> BytecodeViewer<'a>
pub fn new(source_map: SourceMap, module: &'a CompiledModule) -> Self
Trait Implementations
sourceimpl<'a> Clone for BytecodeViewer<'a>
impl<'a> Clone for BytecodeViewer<'a>
sourcefn clone(&self) -> BytecodeViewer<'a>
fn clone(&self) -> BytecodeViewer<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl<'a> Debug for BytecodeViewer<'a>
impl<'a> Debug for BytecodeViewer<'a>
sourceimpl LeftScreen for BytecodeViewer<'_>
impl LeftScreen for BytecodeViewer<'_>
type SourceIndex = BytecodeInfo
type SourceIndex = BytecodeInfo
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). Read more
sourcefn 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. Read more
sourcefn backing_string(&self) -> String
fn backing_string(&self) -> String
Return the backing string to be displayed on the left screen.
sourceimpl<'a> RightScreen<BytecodeViewer<'a>> for ModuleViewer
impl<'a> RightScreen<BytecodeViewer<'a>> for ModuleViewer
sourcefn source_for_code_location(
&self,
bytecode_info: &BytecodeInfo
) -> Result<SourceContext>
fn source_for_code_location(
&self,
bytecode_info: &BytecodeInfo
) -> Result<SourceContext>
Take a SourceIndex from the Indexer and turn it into a context that will be diplayed on
the right screen. Read more
fn backing_string(&self) -> String
Auto Trait Implementations
impl<'a> RefUnwindSafe for BytecodeViewer<'a>
impl<'a> Send for BytecodeViewer<'a>
impl<'a> Sync for BytecodeViewer<'a>
impl<'a> Unpin for BytecodeViewer<'a>
impl<'a> UnwindSafe for BytecodeViewer<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more