struct BrowserMirGraphBuilder<'a> {
program: &'a MirProgram,
program_names: ProgramNames,
next_synthetic_id: usize,
next_edge_id: usize,
nodes: Vec<BrowserMirNode>,
edges: Vec<BrowserMirEdge>,
}Fields§
§program: &'a MirProgram§program_names: ProgramNames§next_synthetic_id: usize§next_edge_id: usize§nodes: Vec<BrowserMirNode>§edges: Vec<BrowserMirEdge>Implementations§
Source§impl<'a> BrowserMirGraphBuilder<'a>
impl<'a> BrowserMirGraphBuilder<'a>
Sourcepub(super) fn new(program: &'a MirProgram) -> Self
pub(super) fn new(program: &'a MirProgram) -> Self
Create a browser graph builder for one MIR program.
Sourcepub(super) fn emit_program(&mut self) -> String
pub(super) fn emit_program(&mut self) -> String
Emit the full MIR program graph and return the root node id.
Sourcefn emit_function(
&mut self,
program_id: &str,
func_id: MirFuncId,
function: &MirFunction,
)
fn emit_function( &mut self, program_id: &str, func_id: MirFuncId, function: &MirFunction, )
Emit one MIR function subgraph.
Sourcefn emit_block(
&mut self,
func_id: MirFuncId,
function: &MirFunction,
block_index: usize,
block: &MirBlock,
function_names: &FunctionNames,
) -> String
fn emit_block( &mut self, func_id: MirFuncId, function: &MirFunction, block_index: usize, block: &MirBlock, function_names: &FunctionNames, ) -> String
Emit one MIR block node.
Source§impl<'a> BrowserMirGraphBuilder<'a>
impl<'a> BrowserMirGraphBuilder<'a>
Sourcepub(super) fn node(
&mut self,
id: String,
kind: &str,
summary: Option<String>,
category: &'static str,
details: Vec<String>,
) -> String
pub(super) fn node( &mut self, id: String, kind: &str, summary: Option<String>, category: &'static str, details: Vec<String>, ) -> String
Insert one graph node and return its id.
Sourcepub(super) fn append_detail(&mut self, node_id: &str, detail: String)
pub(super) fn append_detail(&mut self, node_id: &str, detail: String)
Append one detail line to an existing graph node.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for BrowserMirGraphBuilder<'a>
impl<'a> RefUnwindSafe for BrowserMirGraphBuilder<'a>
impl<'a> Send for BrowserMirGraphBuilder<'a>
impl<'a> Sync for BrowserMirGraphBuilder<'a>
impl<'a> Unpin for BrowserMirGraphBuilder<'a>
impl<'a> UnwindSafe for BrowserMirGraphBuilder<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more