pub trait PortgraphNodeMap<N>:
Clone
+ Sized
+ Debug {
// Required methods
fn to_portgraph(&self, node: N) -> NodeIndex;
fn from_portgraph(&self, node: NodeIndex) -> N;
}
Expand description
A map between hugr nodes and portgraph nodes in the graph returned by
HugrInternals::region_portgraph
.
Required Methods§
Sourcefn to_portgraph(&self, node: N) -> NodeIndex
fn to_portgraph(&self, node: N) -> NodeIndex
Returns the portgraph index of a HUGR node in the associated region graph.
If the node is not in the region, the result is undefined.
Sourcefn from_portgraph(&self, node: NodeIndex) -> N
fn from_portgraph(&self, node: NodeIndex) -> N
Returns the HUGR node for a portgraph node in the associated region graph.
If the node is not in the region, the result is undefined.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.