neovim_lib/
neovim_api_async.rs

1// Auto generated 2019-01-27 23:29:06.038446
2
3use async::AsyncCall;
4use neovim::*;
5use neovim_api::*;
6use rpc::*;
7
8pub trait NeovimApiAsync {
9    /// since: 1
10    fn ui_detach_async(&mut self) -> AsyncCall<()>;
11    /// since: 1
12    fn ui_try_resize_async(&mut self, width: i64, height: i64) -> AsyncCall<()>;
13    /// since: 1
14    fn ui_set_option_async(&mut self, name: &str, value: Value) -> AsyncCall<()>;
15    /// since: 1
16    fn command_async(&mut self, command: &str) -> AsyncCall<()>;
17    /// since: 3
18    fn get_hl_by_name_async(&mut self, name: &str, rgb: bool) -> AsyncCall<Vec<(Value, Value)>>;
19    /// since: 3
20    fn get_hl_by_id_async(&mut self, hl_id: i64, rgb: bool) -> AsyncCall<Vec<(Value, Value)>>;
21    /// since: 1
22    fn feedkeys_async(&mut self, keys: &str, mode: &str, escape_csi: bool) -> AsyncCall<()>;
23    /// since: 1
24    fn input_async(&mut self, keys: &str) -> AsyncCall<i64>;
25    /// since: 1
26    fn replace_termcodes_async(
27        &mut self,
28        str: &str,
29        from_part: bool,
30        do_lt: bool,
31        special: bool,
32    ) -> AsyncCall<String>;
33    /// since: 1
34    fn command_output_async(&mut self, command: &str) -> AsyncCall<String>;
35    /// since: 1
36    fn eval_async(&mut self, expr: &str) -> AsyncCall<Value>;
37    /// since: 3
38    fn execute_lua_async(&mut self, code: &str, args: Vec<Value>) -> AsyncCall<Value>;
39    /// since: 1
40    fn call_function_async(&mut self, fname: &str, args: Vec<Value>) -> AsyncCall<Value>;
41    /// since: 4
42    fn call_dict_function_async(
43        &mut self,
44        dict: Value,
45        fname: &str,
46        args: Vec<Value>,
47    ) -> AsyncCall<Value>;
48    /// since: 1
49    fn strwidth_async(&mut self, text: &str) -> AsyncCall<i64>;
50    /// since: 1
51    fn list_runtime_paths_async(&mut self) -> AsyncCall<Vec<String>>;
52    /// since: 1
53    fn set_current_dir_async(&mut self, dir: &str) -> AsyncCall<()>;
54    /// since: 1
55    fn get_current_line_async(&mut self) -> AsyncCall<String>;
56    /// since: 1
57    fn set_current_line_async(&mut self, line: &str) -> AsyncCall<()>;
58    /// since: 1
59    fn del_current_line_async(&mut self) -> AsyncCall<()>;
60    /// since: 1
61    fn get_var_async(&mut self, name: &str) -> AsyncCall<Value>;
62    /// since: 1
63    fn set_var_async(&mut self, name: &str, value: Value) -> AsyncCall<()>;
64    /// since: 1
65    fn del_var_async(&mut self, name: &str) -> AsyncCall<()>;
66    /// since: 1
67    fn get_vvar_async(&mut self, name: &str) -> AsyncCall<Value>;
68    /// since: 1
69    fn get_option_async(&mut self, name: &str) -> AsyncCall<Value>;
70    /// since: 1
71    fn set_option_async(&mut self, name: &str, value: Value) -> AsyncCall<()>;
72    /// since: 1
73    fn out_write_async(&mut self, str: &str) -> AsyncCall<()>;
74    /// since: 1
75    fn err_write_async(&mut self, str: &str) -> AsyncCall<()>;
76    /// since: 1
77    fn err_writeln_async(&mut self, str: &str) -> AsyncCall<()>;
78    /// since: 1
79    fn list_bufs_async(&mut self) -> AsyncCall<Vec<Buffer>>;
80    /// since: 1
81    fn get_current_buf_async(&mut self) -> AsyncCall<Buffer>;
82    /// since: 1
83    fn set_current_buf_async(&mut self, buffer: &Buffer) -> AsyncCall<()>;
84    /// since: 1
85    fn list_wins_async(&mut self) -> AsyncCall<Vec<Window>>;
86    /// since: 1
87    fn get_current_win_async(&mut self) -> AsyncCall<Window>;
88    /// since: 1
89    fn set_current_win_async(&mut self, window: &Window) -> AsyncCall<()>;
90    /// since: 1
91    fn list_tabpages_async(&mut self) -> AsyncCall<Vec<Tabpage>>;
92    /// since: 1
93    fn get_current_tabpage_async(&mut self) -> AsyncCall<Tabpage>;
94    /// since: 1
95    fn set_current_tabpage_async(&mut self, tabpage: &Tabpage) -> AsyncCall<()>;
96    /// since: 5
97    fn create_namespace_async(&mut self, name: &str) -> AsyncCall<i64>;
98    /// since: 5
99    fn get_namespaces_async(&mut self) -> AsyncCall<Vec<(Value, Value)>>;
100    /// since: 1
101    fn subscribe_async(&mut self, event: &str) -> AsyncCall<()>;
102    /// since: 1
103    fn unsubscribe_async(&mut self, event: &str) -> AsyncCall<()>;
104    /// since: 1
105    fn get_color_by_name_async(&mut self, name: &str) -> AsyncCall<i64>;
106    /// since: 1
107    fn get_color_map_async(&mut self) -> AsyncCall<Vec<(Value, Value)>>;
108    /// since: 2
109    fn get_mode_async(&mut self) -> AsyncCall<Vec<(Value, Value)>>;
110    /// since: 3
111    fn get_keymap_async(&mut self, mode: &str) -> AsyncCall<Vec<Vec<(Value, Value)>>>;
112    /// since: 4
113    fn get_commands_async(&mut self, opts: Vec<(Value, Value)>) -> AsyncCall<Vec<(Value, Value)>>;
114    /// since: 1
115    fn get_api_info_async(&mut self) -> AsyncCall<Vec<Value>>;
116    /// since: 4
117    fn set_client_info_async(
118        &mut self,
119        name: &str,
120        version: Vec<(Value, Value)>,
121        typ: &str,
122        methods: Vec<(Value, Value)>,
123        attributes: Vec<(Value, Value)>,
124    ) -> AsyncCall<()>;
125    /// since: 4
126    fn get_chan_info_async(&mut self, chan: i64) -> AsyncCall<Vec<(Value, Value)>>;
127    /// since: 4
128    fn list_chans_async(&mut self) -> AsyncCall<Vec<Value>>;
129    /// since: 1
130    fn call_atomic_async(&mut self, calls: Vec<Value>) -> AsyncCall<Vec<Value>>;
131    /// since: 4
132    fn parse_expression_async(
133        &mut self,
134        expr: &str,
135        flags: &str,
136        highlight: bool,
137    ) -> AsyncCall<Vec<(Value, Value)>>;
138    /// since: 4
139    fn list_uis_async(&mut self) -> AsyncCall<Vec<Value>>;
140    /// since: 4
141    fn get_proc_children_async(&mut self, pid: i64) -> AsyncCall<Vec<Value>>;
142    /// since: 4
143    fn get_proc_async(&mut self, pid: i64) -> AsyncCall<Value>;
144}
145
146impl NeovimApiAsync for Neovim {
147    fn ui_detach_async(&mut self) -> AsyncCall<()> {
148        self.session
149            .call_async::<()>("nvim_ui_detach", call_args![])
150    }
151
152    fn ui_try_resize_async(&mut self, width: i64, height: i64) -> AsyncCall<()> {
153        self.session
154            .call_async::<()>("nvim_ui_try_resize", call_args![width, height])
155    }
156
157    fn ui_set_option_async(&mut self, name: &str, value: Value) -> AsyncCall<()> {
158        self.session
159            .call_async::<()>("nvim_ui_set_option", call_args![name, value])
160    }
161
162    fn command_async(&mut self, command: &str) -> AsyncCall<()> {
163        self.session
164            .call_async::<()>("nvim_command", call_args![command])
165    }
166
167    fn get_hl_by_name_async(&mut self, name: &str, rgb: bool) -> AsyncCall<Vec<(Value, Value)>> {
168        self.session
169            .call_async::<Vec<(Value, Value)>>("nvim_get_hl_by_name", call_args![name, rgb])
170    }
171
172    fn get_hl_by_id_async(&mut self, hl_id: i64, rgb: bool) -> AsyncCall<Vec<(Value, Value)>> {
173        self.session
174            .call_async::<Vec<(Value, Value)>>("nvim_get_hl_by_id", call_args![hl_id, rgb])
175    }
176
177    fn feedkeys_async(&mut self, keys: &str, mode: &str, escape_csi: bool) -> AsyncCall<()> {
178        self.session
179            .call_async::<()>("nvim_feedkeys", call_args![keys, mode, escape_csi])
180    }
181
182    fn input_async(&mut self, keys: &str) -> AsyncCall<i64> {
183        self.session
184            .call_async::<i64>("nvim_input", call_args![keys])
185    }
186
187    fn replace_termcodes_async(
188        &mut self,
189        str: &str,
190        from_part: bool,
191        do_lt: bool,
192        special: bool,
193    ) -> AsyncCall<String> {
194        self.session.call_async::<String>(
195            "nvim_replace_termcodes",
196            call_args![str, from_part, do_lt, special],
197        )
198    }
199
200    fn command_output_async(&mut self, command: &str) -> AsyncCall<String> {
201        self.session
202            .call_async::<String>("nvim_command_output", call_args![command])
203    }
204
205    fn eval_async(&mut self, expr: &str) -> AsyncCall<Value> {
206        self.session
207            .call_async::<Value>("nvim_eval", call_args![expr])
208    }
209
210    fn execute_lua_async(&mut self, code: &str, args: Vec<Value>) -> AsyncCall<Value> {
211        self.session
212            .call_async::<Value>("nvim_execute_lua", call_args![code, args])
213    }
214
215    fn call_function_async(&mut self, fname: &str, args: Vec<Value>) -> AsyncCall<Value> {
216        self.session
217            .call_async::<Value>("nvim_call_function", call_args![fname, args])
218    }
219
220    fn call_dict_function_async(
221        &mut self,
222        dict: Value,
223        fname: &str,
224        args: Vec<Value>,
225    ) -> AsyncCall<Value> {
226        self.session
227            .call_async::<Value>("nvim_call_dict_function", call_args![dict, fname, args])
228    }
229
230    fn strwidth_async(&mut self, text: &str) -> AsyncCall<i64> {
231        self.session
232            .call_async::<i64>("nvim_strwidth", call_args![text])
233    }
234
235    fn list_runtime_paths_async(&mut self) -> AsyncCall<Vec<String>> {
236        self.session
237            .call_async::<Vec<String>>("nvim_list_runtime_paths", call_args![])
238    }
239
240    fn set_current_dir_async(&mut self, dir: &str) -> AsyncCall<()> {
241        self.session
242            .call_async::<()>("nvim_set_current_dir", call_args![dir])
243    }
244
245    fn get_current_line_async(&mut self) -> AsyncCall<String> {
246        self.session
247            .call_async::<String>("nvim_get_current_line", call_args![])
248    }
249
250    fn set_current_line_async(&mut self, line: &str) -> AsyncCall<()> {
251        self.session
252            .call_async::<()>("nvim_set_current_line", call_args![line])
253    }
254
255    fn del_current_line_async(&mut self) -> AsyncCall<()> {
256        self.session
257            .call_async::<()>("nvim_del_current_line", call_args![])
258    }
259
260    fn get_var_async(&mut self, name: &str) -> AsyncCall<Value> {
261        self.session
262            .call_async::<Value>("nvim_get_var", call_args![name])
263    }
264
265    fn set_var_async(&mut self, name: &str, value: Value) -> AsyncCall<()> {
266        self.session
267            .call_async::<()>("nvim_set_var", call_args![name, value])
268    }
269
270    fn del_var_async(&mut self, name: &str) -> AsyncCall<()> {
271        self.session
272            .call_async::<()>("nvim_del_var", call_args![name])
273    }
274
275    fn get_vvar_async(&mut self, name: &str) -> AsyncCall<Value> {
276        self.session
277            .call_async::<Value>("nvim_get_vvar", call_args![name])
278    }
279
280    fn get_option_async(&mut self, name: &str) -> AsyncCall<Value> {
281        self.session
282            .call_async::<Value>("nvim_get_option", call_args![name])
283    }
284
285    fn set_option_async(&mut self, name: &str, value: Value) -> AsyncCall<()> {
286        self.session
287            .call_async::<()>("nvim_set_option", call_args![name, value])
288    }
289
290    fn out_write_async(&mut self, str: &str) -> AsyncCall<()> {
291        self.session
292            .call_async::<()>("nvim_out_write", call_args![str])
293    }
294
295    fn err_write_async(&mut self, str: &str) -> AsyncCall<()> {
296        self.session
297            .call_async::<()>("nvim_err_write", call_args![str])
298    }
299
300    fn err_writeln_async(&mut self, str: &str) -> AsyncCall<()> {
301        self.session
302            .call_async::<()>("nvim_err_writeln", call_args![str])
303    }
304
305    fn list_bufs_async(&mut self) -> AsyncCall<Vec<Buffer>> {
306        self.session
307            .call_async::<Vec<Buffer>>("nvim_list_bufs", call_args![])
308    }
309
310    fn get_current_buf_async(&mut self) -> AsyncCall<Buffer> {
311        self.session
312            .call_async::<Buffer>("nvim_get_current_buf", call_args![])
313    }
314
315    fn set_current_buf_async(&mut self, buffer: &Buffer) -> AsyncCall<()> {
316        self.session
317            .call_async::<()>("nvim_set_current_buf", call_args![buffer])
318    }
319
320    fn list_wins_async(&mut self) -> AsyncCall<Vec<Window>> {
321        self.session
322            .call_async::<Vec<Window>>("nvim_list_wins", call_args![])
323    }
324
325    fn get_current_win_async(&mut self) -> AsyncCall<Window> {
326        self.session
327            .call_async::<Window>("nvim_get_current_win", call_args![])
328    }
329
330    fn set_current_win_async(&mut self, window: &Window) -> AsyncCall<()> {
331        self.session
332            .call_async::<()>("nvim_set_current_win", call_args![window])
333    }
334
335    fn list_tabpages_async(&mut self) -> AsyncCall<Vec<Tabpage>> {
336        self.session
337            .call_async::<Vec<Tabpage>>("nvim_list_tabpages", call_args![])
338    }
339
340    fn get_current_tabpage_async(&mut self) -> AsyncCall<Tabpage> {
341        self.session
342            .call_async::<Tabpage>("nvim_get_current_tabpage", call_args![])
343    }
344
345    fn set_current_tabpage_async(&mut self, tabpage: &Tabpage) -> AsyncCall<()> {
346        self.session
347            .call_async::<()>("nvim_set_current_tabpage", call_args![tabpage])
348    }
349
350    fn create_namespace_async(&mut self, name: &str) -> AsyncCall<i64> {
351        self.session
352            .call_async::<i64>("nvim_create_namespace", call_args![name])
353    }
354
355    fn get_namespaces_async(&mut self) -> AsyncCall<Vec<(Value, Value)>> {
356        self.session
357            .call_async::<Vec<(Value, Value)>>("nvim_get_namespaces", call_args![])
358    }
359
360    fn subscribe_async(&mut self, event: &str) -> AsyncCall<()> {
361        self.session
362            .call_async::<()>("nvim_subscribe", call_args![event])
363    }
364
365    fn unsubscribe_async(&mut self, event: &str) -> AsyncCall<()> {
366        self.session
367            .call_async::<()>("nvim_unsubscribe", call_args![event])
368    }
369
370    fn get_color_by_name_async(&mut self, name: &str) -> AsyncCall<i64> {
371        self.session
372            .call_async::<i64>("nvim_get_color_by_name", call_args![name])
373    }
374
375    fn get_color_map_async(&mut self) -> AsyncCall<Vec<(Value, Value)>> {
376        self.session
377            .call_async::<Vec<(Value, Value)>>("nvim_get_color_map", call_args![])
378    }
379
380    fn get_mode_async(&mut self) -> AsyncCall<Vec<(Value, Value)>> {
381        self.session
382            .call_async::<Vec<(Value, Value)>>("nvim_get_mode", call_args![])
383    }
384
385    fn get_keymap_async(&mut self, mode: &str) -> AsyncCall<Vec<Vec<(Value, Value)>>> {
386        self.session
387            .call_async::<Vec<Vec<(Value, Value)>>>("nvim_get_keymap", call_args![mode])
388    }
389
390    fn get_commands_async(&mut self, opts: Vec<(Value, Value)>) -> AsyncCall<Vec<(Value, Value)>> {
391        self.session
392            .call_async::<Vec<(Value, Value)>>("nvim_get_commands", call_args![opts])
393    }
394
395    fn get_api_info_async(&mut self) -> AsyncCall<Vec<Value>> {
396        self.session
397            .call_async::<Vec<Value>>("nvim_get_api_info", call_args![])
398    }
399
400    fn set_client_info_async(
401        &mut self,
402        name: &str,
403        version: Vec<(Value, Value)>,
404        typ: &str,
405        methods: Vec<(Value, Value)>,
406        attributes: Vec<(Value, Value)>,
407    ) -> AsyncCall<()> {
408        self.session.call_async::<()>(
409            "nvim_set_client_info",
410            call_args![name, version, typ, methods, attributes],
411        )
412    }
413
414    fn get_chan_info_async(&mut self, chan: i64) -> AsyncCall<Vec<(Value, Value)>> {
415        self.session
416            .call_async::<Vec<(Value, Value)>>("nvim_get_chan_info", call_args![chan])
417    }
418
419    fn list_chans_async(&mut self) -> AsyncCall<Vec<Value>> {
420        self.session
421            .call_async::<Vec<Value>>("nvim_list_chans", call_args![])
422    }
423
424    fn call_atomic_async(&mut self, calls: Vec<Value>) -> AsyncCall<Vec<Value>> {
425        self.session
426            .call_async::<Vec<Value>>("nvim_call_atomic", call_args![calls])
427    }
428
429    fn parse_expression_async(
430        &mut self,
431        expr: &str,
432        flags: &str,
433        highlight: bool,
434    ) -> AsyncCall<Vec<(Value, Value)>> {
435        self.session.call_async::<Vec<(Value, Value)>>(
436            "nvim_parse_expression",
437            call_args![expr, flags, highlight],
438        )
439    }
440
441    fn list_uis_async(&mut self) -> AsyncCall<Vec<Value>> {
442        self.session
443            .call_async::<Vec<Value>>("nvim_list_uis", call_args![])
444    }
445
446    fn get_proc_children_async(&mut self, pid: i64) -> AsyncCall<Vec<Value>> {
447        self.session
448            .call_async::<Vec<Value>>("nvim_get_proc_children", call_args![pid])
449    }
450
451    fn get_proc_async(&mut self, pid: i64) -> AsyncCall<Value> {
452        self.session
453            .call_async::<Value>("nvim_get_proc", call_args![pid])
454    }
455}