1#ifndef NVIM_API_PRIVATE_DISPATCH_H
2#define NVIM_API_PRIVATE_DISPATCH_H
3
4#include "nvim/api/private/defs.h"
5
6typedef Object (*ApiDispatchWrapper)(uint64_t channel_id,
7 Array args,
8 Error *error);
9
10/// The rpc_method_handlers table, used in msgpack_rpc_dispatch(), stores
11/// functions of this type.
12typedef struct {
13 ApiDispatchWrapper fn;
14 bool fast; // Function is safe to be executed immediately while running the
15 // uv loop (the loop is run very frequently due to breakcheck).
16 // If "fast" is false, the function is deferred, i e the call will
17 // be put in the event queue, for safe handling later.
18} MsgpackRpcRequestHandler;
19
20#ifdef INCLUDE_GENERATED_DECLARATIONS
21# include "api/private/dispatch.h.generated.h"
22# include "api/private/dispatch_wrappers.h.generated.h"
23#endif
24
25#endif // NVIM_API_PRIVATE_DISPATCH_H
26