pub unsafe extern "C" fn nix_init_apply(
context: *mut nix_c_context,
value: *mut nix_value,
fn_: *mut nix_value,
arg: *mut nix_value,
) -> nix_errExpand description
Set the value to a thunk that will perform a function application when needed. @ingroup value_create Thunks may be put into attribute sets and lists to perform some computation lazily; on demand. However, note that in some places, a thunk must not be returned, such as in the return value of a PrimOp. In such cases, you may use nix_value_call() instead (but note the different argument order).
§Arguments
context[out] - Optional, stores error informationvalue[out] - Nix value to modifyfn[in] - function to callarg[in] - argument to pass
§Returns
error code, NIX_OK on successful initialization.
§See also
nix_value_call()for a similar function that performs the call immediately and only stores the return value. Note the different argument order.