Module views

Source
Expand description

Read-only access into HUGR graphs and subgraphs.

Re-exports§

pub use self::petgraph::PetgraphWrapper;
pub use descendants::DescendantsGraph;
pub use sibling::SiblingGraph;
pub use sibling_subgraph::SiblingSubgraph;

Modules§

descendants
DescendantsGraph: view onto the subgraph of the HUGR starting from a root (all descendants at all depths).
petgraph
Implementations of petgraph’s traits for Hugr Region views.
render
Helper methods to compute the node/edge/port style when rendering a HUGR into dot or mermaid format.
sibling
SiblingGraph: view onto a sibling subgraph of the HUGR.
sibling_subgraph
Views for HUGR sibling subgraphs.

Structs§

RootChecked
A view of the whole Hugr. (Just provides static checking of the type of the root node)

Traits§

ExtractHugr
A trait for HugrViews that can be extracted into a valid HUGR containing only the nodes and edges of the view.
HierarchyView
A common trait for views of a HUGR hierarchical subgraph.
HugrView
A trait for inspecting HUGRs. For end users we intend this to be superseded by region-specific APIs.
PortIterator
Trait implementing methods on port iterators.
RootTagged
Trait for views that provides a guaranteed bound on the type of the root node.