Struct nvim_oxi_api::opts::SetKeymapOptsBuilder

source ·
pub struct SetKeymapOptsBuilder(/* private fields */);

Implementations§

source§

impl SetKeymapOptsBuilder

source

pub fn callback<F>(&mut self, fun: F) -> &mut Self
where F: ToFunction<(), ()>,

A function to call when the mapping is executed.

source

pub fn desc(&mut self, desc: &str) -> &mut Self

A description for the keymap.

source

pub fn expr(&mut self, expr: bool) -> &mut Self

Whether the keymap argument is an expression.

source

pub fn noremap(&mut self, noremap: bool) -> &mut Self

Whether the right-hand side of the mapping shouldn’t be remappable.

source

pub fn nowait(&mut self, nowait: bool) -> &mut Self

For buffer-local mappings, whether Neovim should wait for more characters to be typed if there’s a global mapping that could also match. See :h map-nowait for more details.

source

pub fn replace_keycodes(&mut self, replace_keycodes: bool) -> &mut Self

When expr is true, this option can be used to replace the keycodes in the resulting string (see replace_termcodes()).

source

pub fn script(&mut self, script: bool) -> &mut Self

Whether to remap characters in the right-hand side by expanding the <sid> script tag.

source

pub fn silent(&mut self, silent: bool) -> &mut Self

Whether the keymap should be silent.

source

pub fn unique(&mut self, unique: bool) -> &mut Self

If true setting the keymap fill fail if another keymap with the same left-hand side already exists.

source

pub fn build(&mut self) -> SetKeymapOpts

Trait Implementations§

source§

impl Clone for SetKeymapOptsBuilder

source§

fn clone(&self) -> SetKeymapOptsBuilder

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for SetKeymapOptsBuilder

source§

fn default() -> SetKeymapOptsBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoResult<T> for T

§

type Error = Infallible

The error type in the returned Result.
source§

fn into_result(self) -> Result<T, <T as IntoResult<T>>::Error>

Converts the value into a Result.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.