Skip to main content

nix_init_bool

Function nix_init_bool 

Source
pub unsafe extern "C" fn nix_init_bool(
    context: *mut nix_c_context,
    value: *mut nix_value,
    b: bool,
) -> nix_err
Expand description

@name Initializers Values are typically “returned” by initializing already allocated memory that serves as the return value. For this reason, the construction of values is not tied their allocation. Nix is a language with immutable values. Respect this property by only initializing Values once; and only initialize Values that are meant to be initialized by you. Failing to adhere to these rules may lead to undefined behavior. @ingroup value_create

§Arguments

  • context [out] - Optional, stores error information
  • value [out] - Nix value to modify
  • b [in] - the boolean value

§Returns

error code, NIX_OK on success.