hugr_core::builder

Trait SubContainer

source
pub trait SubContainer: Container {
    type ContainerHandle;

    // Required method
    fn finish_sub_container(self) -> Result<Self::ContainerHandle, BuildError>;
}
Expand description

Types implementing this trait build a container graph region by borrowing a HUGR

Required Associated Types§

source

type ContainerHandle

A handle to the finished container node, typically returned when the child graph has been finished.

Required Methods§

source

fn finish_sub_container(self) -> Result<Self::ContainerHandle, BuildError>

Consume the container builder and return the handle, may perform some checks before finishing.

Object Safety§

This trait is not object safe.

Implementors§