hugr_core::hugr::views

Trait ExtractHugr

source
pub trait ExtractHugr: HugrView + Sized {
    // Provided method
    fn extract_hugr(self) -> Hugr { ... }
}
Expand description

A trait for HugrViews that can be extracted into a valid HUGR containing only the nodes and edges of the view.

Provided Methods§

source

fn extract_hugr(self) -> Hugr

Extracts the view into an owned HUGR, rooted at the view’s root node and containing only the nodes and edges of the view.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl ExtractHugr for &Hugr

source§

impl ExtractHugr for &mut Hugr

source§

impl ExtractHugr for Hugr

source§

impl<'g, Root: NodeHandle> ExtractHugr for DescendantsGraph<'g, Root>

source§

impl<'g, Root: NodeHandle> ExtractHugr for SiblingGraph<'g, Root>

source§

impl<'g, Root: NodeHandle> ExtractHugr for SiblingMut<'g, Root>