Function nix_setting_get

Source
pub unsafe extern "C" fn nix_setting_get(
    context: *mut nix_c_context,
    key: *const c_char,
    callback: nix_get_string_callback,
    user_data: *mut c_void,
) -> nix_err
Expand description

@defgroup settings Nix configuration settings Retrieves a setting from the nix global configuration. This function requires nix_libutil_init() to be called at least once prior to its use.

§Arguments

  • context [out] - optional, Stores error information
  • key [in] - The key of the setting to retrieve.
  • callback [in] - Called with the setting value.
  • user_data [in] - optional, arbitrary data, passed to the callback when it’s called.

§See also

nix_get_string_callback

§Returns

NIX_ERR_KEY if the setting is unknown, or NIX_OK if the setting was retrieved successfully.