pub struct VimVar<Name: AsRef<str>> { /* private fields */ }
Expand description

Represents a vim variable to be extracted

Implementations

Creates a new vim variable definition that can be used later to load the variable’s contents

Returns Cmd tied to variable

Returns Scope tied to variable

Returns name tied to variable

Loads variable with Self::load and then attempts to convert it to the specified type

Notes
  • If allow_zero is true, then a value of 0 is considered the value of the variable rather than vim’s default of not being found

Loads the variable’s value using neovim’s headless mode or vim’s ex mode using the default vimrc available in scope

Notes
  • Will leverage search::find_vimrc to load in the appropriate vimrc during ex mode
  • If allow_zero is true, then a value of 0 is considered the value of the variable rather than vim’s default of not being found

Loads variable with Self::load_with_config and then attempts to convert it to the specified type

Notes
  • If allow_zero is true, then a value of 0 is considered the value of the variable rather than vim’s default of not being found

Loads the variable’s value using neovim’s headless mode or vim’s ex mode

Notes
  • Spawns a vim process whose goal is to print out the contents of a variable as a JSON string
  • Leverages batch & ex modes with redir to execute and capture output
  • Relies on the variable being available upon loading vim configs
  • If allow_zero is true, then a value of 0 is considered the value of the variable rather than vim’s default of not being found

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.