Trait ExtractionResult

Source
pub trait ExtractionResult<SourceN> {
    // Required method
    fn extracted_node(&self, node: SourceN) -> Node;
}
Expand description

Records the result of extracting a Hugr via HugrView::extract_hugr.

Contains a map from the nodes in the source HUGR to the nodes in the extracted HUGR, using their respective Node types.

Required Methods§

Source

fn extracted_node(&self, node: SourceN) -> Node

Returns the node in the extracted HUGR that corresponds to the given node in the source HUGR.

If the source node was not a descendant of the entrypoint, the result is undefined.

Implementations on Foreign Types§

Source§

impl<S: HugrNode> ExtractionResult<S> for HashMap<S, Node>

Source§

fn extracted_node(&self, node: S) -> Node

Implementors§