hugr_core::builder

Trait DataflowHugr

source
pub trait DataflowHugr: HugrBuilder + Dataflow {
    // Provided methods
    fn finish_hugr_with_outputs(
        self,
        outputs: impl IntoIterator<Item = Wire>,
        extension_registry: &ExtensionRegistry,
    ) -> Result<Hugr, BuildError>
       where Self: Sized { ... }
    fn finish_prelude_hugr_with_outputs(
        self,
        outputs: impl IntoIterator<Item = Wire>,
    ) -> Result<Hugr, BuildError>
       where Self: Sized { ... }
}
Expand description

Trait implemented by builders of Dataflow Hugrs

Provided Methods§

source

fn finish_hugr_with_outputs( self, outputs: impl IntoIterator<Item = Wire>, extension_registry: &ExtensionRegistry, ) -> Result<Hugr, BuildError>
where Self: Sized,

Set outputs of dataflow HUGR and return validated HUGR

§Errors
  • if there is an error when setting outputs
  • if the Hugr does not validate
source

fn finish_prelude_hugr_with_outputs( self, outputs: impl IntoIterator<Item = Wire>, ) -> Result<Hugr, BuildError>
where Self: Sized,

Sets the outputs of a dataflow Hugr, validates against the prelude extension only, and return the Hugr

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.

Implementors§