MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
Loading...
Searching...
No Matches
mln_completion_result Struct Reference

#include <completion.h>

Data Fields

int32_t status
uint32_t disposition
uint32_t value_size
uint64_t generation
uint64_t render_update_generation
mln_buffer_view diagnostic
const void * value
size_t value_count

Detailed Description

Borrowed terminal result for one accepted asynchronous submission.

The submitting function defines the type behind value and the meaning of value_count. A function with no result completes with value null and value_count zero, as does any failed completion. Every pointer remains valid only for the completion callback.

disposition and generation are meaningful for commands. Other one-shot functions set disposition to MLN_COMMAND_DISPOSITION_COMMITTED and generation to zero.

A map command delivers the runtime events it raises before its completion runs: a callback handler has returned from them, or a queue handler's queue holds them. Those events carry the generation this result reports.

Field Documentation

◆ diagnostic

mln_buffer_view mln_completion_result::diagnostic

Borrowed diagnostic bytes, empty on success.

◆ disposition

uint32_t mln_completion_result::disposition

◆ generation

uint64_t mln_completion_result::generation

Map snapshot generation published after a map command ran, whether it committed or failed; zero when the command never ran or the function is not a command.

◆ render_update_generation

uint64_t mln_completion_result::render_update_generation

Generation of the first map render update that includes the command. A frame result with disposition MLN_RENDER_RESULT_RENDERED and a map_update_generation at or past this value was rendered from map state that includes the command. Inside a command group, this is the update that the outermost group end publishes. Zero when generation is zero.

◆ status

int32_t mln_completion_result::status

Terminal status, one of mln_status.

◆ value

const void* mln_completion_result::value

Borrowed function-specific result, or null when the function has none.

◆ value_count

size_t mln_completion_result::value_count

Function-specific element count for value.

◆ value_size

uint32_t mln_completion_result::value_size

Byte stride of one element of value: sizeof the result record in the native build, at least sizeof in the caller's header. Zero when value is null. Index array results with this value.


The documentation for this struct was generated from the following file: