pub struct HydroGraphStructure {
pub nodes: HashMap<usize, HydroGraphNode>,
pub edges: Vec<HydroGraphEdge>,
pub locations: HashMap<usize, String>,
pub next_node_id: usize,
}Available on crate feature
viz only.Expand description
Graph structure tracker for Hydro IR rendering.
Fields§
§nodes: HashMap<usize, HydroGraphNode>§edges: Vec<HydroGraphEdge>§locations: HashMap<usize, String>§next_node_id: usizeImplementations§
Source§impl HydroGraphStructure
impl HydroGraphStructure
pub fn new() -> Self
pub fn add_node( &mut self, label: NodeLabel, node_type: HydroNodeType, location: Option<usize>, ) -> usize
pub fn add_node_with_backtrace( &mut self, label: NodeLabel, node_type: HydroNodeType, location: Option<usize>, backtrace: Option<Backtrace>, ) -> usize
Sourcepub fn add_node_with_metadata(
&mut self,
label: NodeLabel,
node_type: HydroNodeType,
metadata: &HydroIrMetadata,
) -> usize
pub fn add_node_with_metadata( &mut self, label: NodeLabel, node_type: HydroNodeType, metadata: &HydroIrMetadata, ) -> usize
Add a node with metadata, extracting backtrace automatically
pub fn add_edge( &mut self, src: usize, dst: usize, edge_properties: HashSet<HydroEdgeProp>, label: Option<String>, )
pub fn add_edge_single( &mut self, src: usize, dst: usize, edge_type: HydroEdgeProp, label: Option<String>, )
pub fn add_location(&mut self, location_id: usize, location_type: String)
Trait Implementations§
Source§impl Default for HydroGraphStructure
impl Default for HydroGraphStructure
Source§fn default() -> HydroGraphStructure
fn default() -> HydroGraphStructure
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HydroGraphStructure
impl !RefUnwindSafe for HydroGraphStructure
impl !Send for HydroGraphStructure
impl !Sync for HydroGraphStructure
impl Unpin for HydroGraphStructure
impl UnwindSafe for HydroGraphStructure
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> ToSinkBuild for T
impl<T> ToSinkBuild for T
§fn iter_to_sink_build(self) -> SendIterBuild<Self>
fn iter_to_sink_build(self) -> SendIterBuild<Self>
§fn stream_to_sink_build(self) -> SendStreamBuild<Self>where
Self: Sized + Stream,
fn stream_to_sink_build(self) -> SendStreamBuild<Self>where
Self: Sized + Stream,
Starts a [
SinkBuild] adaptor chain to send all items from self as a [Stream].