Skip to main content

emit_generic_helpers_qualified

Function emit_generic_helpers_qualified 

Source
pub fn emit_generic_helpers_qualified(
    insts: &[WireInst],
    types: &HashMap<String, Arc<TypeDecl>>,
    qual: &HashMap<String, String>,
    ru: &RuntimeUse,
) -> Vec<TsDecl>
Expand description

#661: as emit_generic_helpers, but the value-type positions of each specialised helper are named through the type Qual — so a consumer’s deserialise_Result_AuthId_PaymentError returns Result<commerce_payment.AuthId, commerce_payment.PaymentError> while its codec calls stay local. The codec suffix (Result_AuthId_PaymentError) is namespace-independent by construction, which is exactly what keeps the caller’s and callee’s names in agreement across the wire.

Arc F slice 1 (#1451): returns the real bynk_ts::TsDecl nodes directly — no out: &mut String parameter. The boundary-collect step (super::decls_as_stmts) now happens once, at the caller, instead of inline in each of this function’s six match arms.