Called once per key by `list`. `key` is valid only for the duration of
the callback; copy it to keep it. A status other than SIG_OK stops the
listing and is returned from it.
A persistence module (backend) stores opaque blobs under a
(namespace, key) pair. What a namespace means is up to the backend
(the file backend maps it to a directory), and so is which names it
accepts: a backend returns SIG_ERR_INVALID_ARG for a namespace or
key it cannot store.
`name` and `create` are required. A NULL data hook makes the matching
sig_persistence_* call return SIG_ERR_INVALID_ARG. Hooks block; they
are meant for configuration I/O, not the event loop's hot path.
- load: *out_data is allocated with sig_alloc and owned by the
caller. A missing key (or namespace) is SIG_ERR_NOT_FOUND.
- save: creates or replaces the key; data is borrowed.
- remove: a missing key (or namespace) is SIG_ERR_NOT_FOUND.
- list: calls fn once per key stored in ns; a namespace that holds
nothing (or does not exist) lists zero keys. The order is
backend-defined (the file backend sorts). fn must not save
or remove keys in the namespace being listed.
The data calls below forward to the module's hooks (see
sig_persistence_module for their contracts). A NULL argument, or a
module without the hook, is SIG_ERR_INVALID_ARG.
data is borrowed -- the implementation copies what it needs to
persist; caller retains ownership and may free/reuse data
immediately after this call returns. data may be NULL only when
len is 0.