#[derive(Clone, Debug, Default)]
#[repr(C)]
pub struct EchoOpts {
#[cfg(not(feature = "neovim-0-10"))] verbose: types::Object,
#[cfg(feature = "neovim-0-10")] verbose: bool,
}
impl EchoOpts {
#[inline(always)]
pub fn builder() -> EchoOptsBuilder {
EchoOptsBuilder::default()
}
}
#[derive(Clone, Default)]
pub struct EchoOptsBuilder(EchoOpts);
impl EchoOptsBuilder {
#[inline]
pub fn verbose(&mut self, verbose: bool) -> &mut Self {
#[cfg(not(feature = "neovim-0-10"))] {
self.0.verbose = verbose.into();
}
#[cfg(feature = "neovim-0-10")] {
self.0.verbose = verbose;
}
self
}
#[inline]
pub fn build(&mut self) -> EchoOpts {
core::mem::take(&mut self.0)
}
}