pub struct HydroGraphStructure {
pub nodes: HashMap<usize, (NodeLabel, HydroNodeType, Option<usize>)>,
pub edges: Vec<(usize, usize, HydroEdgeType, Option<String>)>,
pub locations: HashMap<usize, String>,
pub next_node_id: usize,
}
Expand description
Graph structure tracker for Hydro IR rendering.
Fields§
§nodes: HashMap<usize, (NodeLabel, HydroNodeType, Option<usize>)>
§edges: Vec<(usize, usize, HydroEdgeType, Option<String>)>
§locations: HashMap<usize, String>
§next_node_id: usize
Implementations§
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_edge( &mut self, src: usize, dst: usize, edge_type: HydroEdgeType, label: Option<String>, )
pub fn add_location(&mut self, location_id: usize, location_type: String)
Trait Implementations§
Source§impl Debug for HydroGraphStructure
impl Debug for HydroGraphStructure
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