nvim_oxi_api/opts/
get_commands.rs

1/// Options passed to [`Buffer::get_commands()`](crate::Buffer::get_commands)
2/// and [`get_commands()`](crate::get_commands).
3#[derive(Clone, Debug, Default)]
4#[repr(C)]
5pub struct GetCommandsOpts {
6    builtin: bool,
7}
8
9impl GetCommandsOpts {
10    #[inline(always)]
11    pub fn builder() -> GetCommandsOptsBuilder {
12        GetCommandsOptsBuilder::default()
13    }
14}
15
16#[derive(Clone, Default)]
17pub struct GetCommandsOptsBuilder(GetCommandsOpts);
18
19impl GetCommandsOptsBuilder {
20    #[inline]
21    pub fn builtin(&mut self, builtin: bool) -> &mut Self {
22        self.0.builtin = builtin;
23        self
24    }
25
26    #[inline]
27    pub fn build(&mut self) -> GetCommandsOpts {
28        std::mem::take(&mut self.0)
29    }
30}