store_open

Function store_open 

Source
pub unsafe extern "C" fn store_open(
    context: *mut c_context,
    uri: *const c_char,
    params: *mut *mut *const c_char,
) -> *mut Store
Expand description

@brief Open a nix store.

Store instances may share state and resources behind the scenes.

@param[out] context Optional, stores error information

@param[in] uri @parblock URI of the Nix store, copied.

If NULL, the store from the settings will be used. Note that "auto" holds a strange middle ground, reading part of the general environment, but not all of it. It ignores NIX_REMOTE and the store option. For this reason, NULL is most likely the better choice.

For supported store URLs, see Store URL format in the Nix Reference Manual. @endparblock

@param[in] params @parblock optional, null-terminated array of key-value pairs, e.g. {{“endpoint”, “https://s3.local”}}.

See Store Types in the Nix Reference Manual. @endparblock

@return a Store pointer, NULL in case of errors

@see nix_store_free