Skip to main content

gen_call_args

Function gen_call_args 

Source
pub fn gen_call_args(
    params: &[ParamDef],
    opaque_types: &AHashSet<String>,
) -> String
Expand description

Build call argument expressions from parameters.

  • Opaque Named types: unwrap Arc wrapper via (*param.inner).clone()
  • Non-opaque Named types: .into() for From conversion
  • String/Path/Bytes: &param since core functions typically take &str/&Path/&[u8]
  • Params with newtype_wrapper set: re-wrap the raw value in the newtype constructor (e.g., NodeIndex(parent)) since the binding resolved NodeIndex(u32)u32.

NOTE: This function does not perform serde-based conversion. For Named params that lack From impls (e.g., due to sanitized fields), use gen_serde_let_bindings instead when cfg.has_serde is true, or fall back to gen_unimplemented_body.