pub unsafe extern "C" fn get_attr_name_byidx(
context: *mut c_context,
value: *mut value,
state: *mut EvalState,
i: c_uint,
) -> *const c_charExpand description
@brief Get an attribute name by index @ingroup value_extract
Returns the attribute name without forcing evaluation of the attribute’s value.
Attributes are returned in an unspecified order which is NOT suitable for reproducible operations. In Nix’s domain, reproducibility is paramount. The caller is responsible for sorting the attributes or storing them in an ordered map to ensure deterministic behavior in your application.
@note When Nix does sort attributes, which it does for virtually all intermediate operations and outputs, it uses byte-wise lexicographic order (equivalent to lexicographic order by Unicode scalar value for valid UTF-8). We recommend applying this same ordering for consistency.
@param[out] context Optional, stores error information @param[in] value Nix value to inspect @param[in] state nix evaluator state @param[in] i attribute index @return name string valid until state is freed, NULL in case of errors