GALANTHUS / ABI FUNCTION REFERENCE
gln_get_backend_result_opaque_json
Declared in <galanthus/c_api/gln_capi.h>.
GLN_API const char* GLN_CALL gln_get_backend_result_opaque_json(const gln_backend_result_t* in_result);
Purpose
Returns the opaque JSON payload carried by a backend result envelope when the result kind is GLN_BACKEND_RESULT_KIND_OPAQUE_JSON.
The returned string is borrowed from the parent envelope and becomes invalid when gln_destroy_backend_result releases that envelope. It returns NULL when the envelope is not an opaque JSON result.
Return
Returns the opaque JSON payload carried by a backend result envelope when the result kind is GLN_BACKEND_RESULT_KIND_OPAQUE_JSON.
| Type | Nullability | Ownership |
|---|---|---|
const char* | nullable | borrowed |
Parameters
| Name | Direction | Type | Nullability | Ownership |
|---|---|---|---|---|
in_result | input | const gln_backend_result_t* | nullable | borrowed |
JSON Payload Semantics
Returns a borrowed pointer to the opaque JSON payload stored in the envelope. The accessor requires result kind GLN_BACKEND_RESULT_KIND_OPAQUE_JSON.
Typed success envelopes do not carry an opaque JSON payload. Consume typed results through the matching typed accessor for their result kind.
NULL means either in_result is NULL or the envelope kind is not GLN_BACKEND_RESULT_KIND_OPAQUE_JSON.
Notes
Passing NULL for in_result is allowed and returns NULL.