GALANTHUS / ABI FUNCTION REFERENCE
gln_get_backend_result_kind
Declared in <galanthus/c_api/gln_capi.h>.
GLN_API gln_backend_result_kind_t GLN_CALL gln_get_backend_result_kind(const gln_backend_result_t* in_result);
Purpose
Returns the typed payload kind stored in a backend result envelope.
Use this before borrowing an operation-specific typed view with a gln_get_backend_result_* accessor.
Return
Returns the typed payload kind stored in a backend result envelope.
| Type | Nullability | Ownership |
|---|---|---|
gln_backend_result_kind_t | value | value |
Parameters
| Name | Direction | Type | Nullability | Ownership |
|---|---|---|---|---|
in_result | input | const gln_backend_result_t* | nullable | borrowed |
Kind Semantics
Passing NULL for in_result returns GLN_BACKEND_RESULT_KIND_UNKNOWN.
For a success envelope, the kind selects the payload accessor to use. GLN_BACKEND_RESULT_KIND_OPAQUE_JSON means the envelope carries an opaque JSON success payload for gln_get_backend_result_opaque_json.
Action-required, rejected, and error envelopes generally have no typed success payload. Read action-required envelopes through gln_get_backend_result_interrupt_info and rejected or error envelopes through gln_get_backend_result_error.
Notes
Passing NULL for in_result is allowed and returns GLN_BACKEND_RESULT_KIND_UNKNOWN.