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
Function pointer for primops @ingroup 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§
pub enum PrimOpFun {
None,
Some(unsafe extern "C" fn(*mut c_void, *mut nix_c_context, *mut EvalState, *mut *mut nix_value, *mut nix_value)),
}