#[derive(Clone, Debug, Default)]
#[cfg(not(feature = "neovim-0-10"))] pub struct BufDeleteOpts {
force: types::Object,
unload: types::Object,
}
#[cfg(not(feature = "neovim-0-10"))] impl BufDeleteOpts {
#[inline(always)]
pub fn builder() -> BufDeleteOptsBuilder {
BufDeleteOptsBuilder::default()
}
}
#[derive(Clone, Default)]
#[cfg(not(feature = "neovim-0-10"))] pub struct BufDeleteOptsBuilder(BufDeleteOpts);
#[cfg(not(feature = "neovim-0-10"))] impl BufDeleteOptsBuilder {
#[inline]
pub fn force(&mut self, force: bool) -> &mut Self {
self.0.force = force.into();
self
}
#[inline]
pub fn unload(&mut self, unload: bool) -> &mut Self {
self.0.unload = unload.into();
self
}
#[inline]
pub fn build(&mut self) -> BufDeleteOpts {
std::mem::take(&mut self.0)
}
}
#[cfg(not(feature = "neovim-0-10"))] impl From<&BufDeleteOpts> for types::Dictionary {
fn from(opts: &BufDeleteOpts) -> Self {
Self::from_iter([
("force", opts.force.clone()),
("unload", opts.unload.clone()),
])
}
}
#[cfg(feature = "neovim-0-10")] #[derive(Clone, Debug, Default, macros::OptsBuilder)]
#[repr(C)]
pub struct BufDeleteOpts {
#[builder(mask)]
mask: u64,
#[builder(argtype = "bool")]
force: types::Boolean,
#[builder(argtype = "bool")]
unload: types::Boolean,
}