nvim_oxi_api/opts/
create_autocmd.rs1use crate::Buffer;
2use crate::StringOrInt;
3use crate::types::AutocmdCallbackArgs;
4
5pub type ShouldDeleteAutocmd = bool;
6
7#[derive(Clone, Debug, Default, macros::OptsBuilder)]
9#[repr(C)]
10pub struct CreateAutocmdOpts {
11 #[builder(mask)]
12 mask: u64,
13
14 #[builder(argtype = "Buffer", inline = "{0}.0")]
16 buffer: types::BufHandle,
17
18 #[builder(
21 generics = r#"F: Into<types::Function<AutocmdCallbackArgs, ShouldDeleteAutocmd>>"#,
22 argtype = "F",
23 inline = "{0}.into().into()"
24 )]
25 callback: types::Object,
26
27 #[builder(
31 generics = "S: Into<types::String>",
32 argtype = "S",
33 inline = "{0}.into()"
34 )]
35 command: types::String,
36
37 #[builder(
40 generics = "S: Into<types::String>",
41 argtype = "S",
42 inline = "{0}.into()"
43 )]
44 desc: types::String,
45
46 #[builder(
48 generics = "G: StringOrInt",
49 argtype = "G",
50 inline = "{0}.to_object()"
51 )]
52 group: types::Object,
53
54 #[builder(argtype = "bool")]
56 nested: types::Boolean,
57
58 #[builder(argtype = "bool")]
60 once: types::Boolean,
61
62 #[builder(
64 generics = "'a, I: IntoIterator<Item = &'a str>",
65 method = "patterns",
66 argtype = "I",
67 inline = "types::Array::from_iter({0}).into()"
68 )]
69 pattern: types::Object,
70}