pub type PrimOpFun = Option<unsafe extern "C" fn(user_data: *mut c_void, context: *mut nix_c_context, state: *mut EvalState, args: *mut *mut nix_value, ret: *mut nix_value)>;
Expand description
@defgroup primops Adding primops When you want to return an error, call nix_set_err_msg(context, NIX_ERR_UNKNOWN, “your error message here”).
§Arguments
user_data
[in] - Arbitrary data that was initially supplied to nix_alloc_primopcontext
[out] - Stores error information.state
[in] - Evaluator stateargs
[in] - list of arguments. Note that these can be thunks and should be forced using nix_value_force before use.ret
[out] - return value
§See also
[
nix_alloc_primop,
] nix_init_primop
Aliased Type§
enum PrimOpFun {
None,
Some(unsafe extern "C" fn(_: *mut c_void, _: *mut nix_c_context, _: *mut EvalState, _: *mut *mut nix_value, _: *mut nix_value)),
}