pub trait HugrBuilder: Container {
// Required method
fn finish_hugr(
self,
extension_registry: &ExtensionRegistry,
) -> Result<Hugr, ValidationError>;
// Provided method
fn finish_prelude_hugr(self) -> Result<Hugr, ValidationError>
where Self: Sized { ... }
}
Expand description
Types implementing this trait can be used to build complete HUGRs (with varying root node types)
Required Methods§
sourcefn finish_hugr(
self,
extension_registry: &ExtensionRegistry,
) -> Result<Hugr, ValidationError>
fn finish_hugr( self, extension_registry: &ExtensionRegistry, ) -> Result<Hugr, ValidationError>
Finish building the HUGR, perform any validation checks and return it.
Provided Methods§
sourcefn finish_prelude_hugr(self) -> Result<Hugr, ValidationError>where
Self: Sized,
fn finish_prelude_hugr(self) -> Result<Hugr, ValidationError>where
Self: Sized,
Finish building the HUGR (as HugrBuilder::finish_hugr), validating against the prelude extension only
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.