nvim_oxi_types/
lib.rs

1//! Rust bindings to the C types used by Neovim's API.
2
3extern crate alloc;
4
5mod arena;
6mod array;
7pub mod conversion;
8mod dictionary;
9mod error;
10mod function;
11mod kvec;
12mod macros;
13mod non_owning;
14mod object;
15#[cfg(feature = "serde")]
16pub mod serde;
17mod str;
18mod string;
19mod string_builder;
20
21pub use arena::{Arena, arena, arena_init};
22pub use array::{Array, ArrayFromTupleError};
23pub use dictionary::{Dictionary, KeyValuePair};
24pub use error::Error;
25pub use function::Function;
26pub use non_owning::NonOwning;
27pub use object::{Object, ObjectKind};
28pub use str::NvimStr;
29pub use string::String;
30pub use string_builder::StringBuilder;
31
32pub mod iter {
33    //! Iterators over [`Array`](crate::Array)s and
34    //! [`Dictionary`](crate::Dictionary)s.
35
36    pub use super::array::ArrayIterator;
37    pub use super::dictionary::{DictIter, DictIterMut, DictIterator};
38}
39
40// https://github.com/neovim/neovim/blob/v0.9.0/src/nvim/api/private/defs.h#L69
41#[doc(hidden)]
42pub type Boolean = bool;
43
44// https://github.com/neovim/neovim/blob/v0.9.0/src/nvim/api/private/defs.h#L70
45#[doc(hidden)]
46pub type Integer = i64;
47
48// https://github.com/neovim/neovim/blob/v0.9.0/src/nvim/api/private/defs.h#L71
49#[doc(hidden)]
50pub type Float = core::ffi::c_double;
51
52// https://github.com/neovim/neovim/blob/v0.9.0/src/nvim/types.h#L19
53#[doc(hidden)]
54pub type LuaRef = core::ffi::c_int;
55
56// https://github.com/neovim/neovim/blob/v0.9.0/src/nvim/types.h#L14
57#[allow(non_camel_case_types)]
58type handle_T = core::ffi::c_int;
59
60// https://github.com/neovim/neovim/blob/v0.9.0/src/nvim/api/private/defs.h#L84
61#[doc(hidden)]
62pub type BufHandle = handle_T;
63
64// https://github.com/neovim/neovim/blob/v0.9.0/src/nvim/api/private/defs.h#L85
65#[doc(hidden)]
66pub type WinHandle = handle_T;
67
68// https://github.com/neovim/neovim/blob/v0.9.0/src/nvim/api/private/defs.h#L86
69#[doc(hidden)]
70pub type TabHandle = handle_T;
71
72// https://github.com/neovim/neovim/blob/4f788f78f8b2d59a76b1a54a40af0c478eb3f929/src/nvim/api/private/defs.h#L127
73#[doc(hidden)]
74pub type HlGroupId = Integer;