hugr_core::extension

Trait SignatureFromArgs

source
pub trait SignatureFromArgs: Send + Sync {
    // Required methods
    fn compute_signature(
        &self,
        arg_values: &[TypeArg],
    ) -> Result<PolyFuncTypeRV, SignatureError>;
    fn static_params(&self) -> &[TypeParam];
}
Expand description

Compute signature of OpDef given type arguments.

Required Methods§

source

fn compute_signature( &self, arg_values: &[TypeArg], ) -> Result<PolyFuncTypeRV, SignatureError>

Compute signature of node given values for the type parameters.

source

fn static_params(&self) -> &[TypeParam]

The declared type parameters which require values in order for signature to be computed.

Implementors§