Skip to content

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);
  • Family: Backend result accessors
  • Return type: gln_backend_result_kind_t

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.

TypeNullabilityOwnership
gln_backend_result_kind_tvaluevalue

Parameters

NameDirectionTypeNullabilityOwnership
in_resultinputconst gln_backend_result_t*nullableborrowed

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.

See Also