Struct Neovim

Source
pub struct Neovim {
    pub session: Session,
}

Fields§

§session: Session

Implementations§

Source§

impl Neovim

Source

pub fn new(session: Session) -> Neovim

Source

pub fn ui_attach( &mut self, width: i64, height: i64, opts: &UiAttachOptions, ) -> Result<(), CallError>

Register as a remote UI.

After this method is called, the client will receive redraw notifications.

Source

pub fn quit_no_save(&mut self) -> Result<(), CallError>

Send a quit command to Nvim. The quit command is ‘qa!’ which will make Nvim quit without saving anything.

Source

pub fn set_option(&mut self, option: UiOption) -> Result<(), CallError>

Same as ui_set_option but use UiOption as argument to check type at compile time

Trait Implementations§

Source§

impl NeovimApi for Neovim

Source§

fn ui_detach(&mut self) -> Result<(), CallError>

since: 1
Source§

fn ui_try_resize(&mut self, width: i64, height: i64) -> Result<(), CallError>

since: 1
Source§

fn ui_set_option(&mut self, name: &str, value: Value) -> Result<(), CallError>

since: 1
Source§

fn command(&mut self, command: &str) -> Result<(), CallError>

since: 1
Source§

fn get_hl_by_name( &mut self, name: &str, rgb: bool, ) -> Result<Vec<(Value, Value)>, CallError>

since: 3
Source§

fn get_hl_by_id( &mut self, hl_id: i64, rgb: bool, ) -> Result<Vec<(Value, Value)>, CallError>

since: 3
Source§

fn feedkeys( &mut self, keys: &str, mode: &str, escape_csi: bool, ) -> Result<(), CallError>

since: 1
Source§

fn input(&mut self, keys: &str) -> Result<i64, CallError>

since: 1
Source§

fn replace_termcodes( &mut self, str: &str, from_part: bool, do_lt: bool, special: bool, ) -> Result<String, CallError>

since: 1
Source§

fn command_output(&mut self, command: &str) -> Result<String, CallError>

since: 1
Source§

fn eval(&mut self, expr: &str) -> Result<Value, CallError>

since: 1
Source§

fn execute_lua( &mut self, code: &str, args: Vec<Value>, ) -> Result<Value, CallError>

since: 3
Source§

fn call_function( &mut self, fname: &str, args: Vec<Value>, ) -> Result<Value, CallError>

since: 1
Source§

fn call_dict_function( &mut self, dict: Value, fname: &str, args: Vec<Value>, ) -> Result<Value, CallError>

since: 4
Source§

fn strwidth(&mut self, text: &str) -> Result<i64, CallError>

since: 1
Source§

fn list_runtime_paths(&mut self) -> Result<Vec<String>, CallError>

since: 1
Source§

fn set_current_dir(&mut self, dir: &str) -> Result<(), CallError>

since: 1
Source§

fn get_current_line(&mut self) -> Result<String, CallError>

since: 1
Source§

fn set_current_line(&mut self, line: &str) -> Result<(), CallError>

since: 1
Source§

fn del_current_line(&mut self) -> Result<(), CallError>

since: 1
Source§

fn get_var(&mut self, name: &str) -> Result<Value, CallError>

since: 1
Source§

fn set_var(&mut self, name: &str, value: Value) -> Result<(), CallError>

since: 1
Source§

fn del_var(&mut self, name: &str) -> Result<(), CallError>

since: 1
Source§

fn get_vvar(&mut self, name: &str) -> Result<Value, CallError>

since: 1
Source§

fn get_option(&mut self, name: &str) -> Result<Value, CallError>

since: 1
Source§

fn set_option(&mut self, name: &str, value: Value) -> Result<(), CallError>

since: 1
Source§

fn out_write(&mut self, str: &str) -> Result<(), CallError>

since: 1
Source§

fn err_write(&mut self, str: &str) -> Result<(), CallError>

since: 1
Source§

fn err_writeln(&mut self, str: &str) -> Result<(), CallError>

since: 1
Source§

fn list_bufs(&mut self) -> Result<Vec<Buffer>, CallError>

since: 1
Source§

fn get_current_buf(&mut self) -> Result<Buffer, CallError>

since: 1
Source§

fn set_current_buf(&mut self, buffer: &Buffer) -> Result<(), CallError>

since: 1
Source§

fn list_wins(&mut self) -> Result<Vec<Window>, CallError>

since: 1
Source§

fn get_current_win(&mut self) -> Result<Window, CallError>

since: 1
Source§

fn set_current_win(&mut self, window: &Window) -> Result<(), CallError>

since: 1
Source§

fn list_tabpages(&mut self) -> Result<Vec<Tabpage>, CallError>

since: 1
Source§

fn get_current_tabpage(&mut self) -> Result<Tabpage, CallError>

since: 1
Source§

fn set_current_tabpage(&mut self, tabpage: &Tabpage) -> Result<(), CallError>

since: 1
Source§

fn create_namespace(&mut self, name: &str) -> Result<i64, CallError>

since: 5
Source§

fn get_namespaces(&mut self) -> Result<Vec<(Value, Value)>, CallError>

since: 5
Source§

fn subscribe(&mut self, event: &str) -> Result<(), CallError>

since: 1
Source§

fn unsubscribe(&mut self, event: &str) -> Result<(), CallError>

since: 1
Source§

fn get_color_by_name(&mut self, name: &str) -> Result<i64, CallError>

since: 1
Source§

fn get_color_map(&mut self) -> Result<Vec<(Value, Value)>, CallError>

since: 1
Source§

fn get_mode(&mut self) -> Result<Vec<(Value, Value)>, CallError>

since: 2
Source§

fn get_keymap( &mut self, mode: &str, ) -> Result<Vec<Vec<(Value, Value)>>, CallError>

since: 3
Source§

fn get_commands( &mut self, opts: Vec<(Value, Value)>, ) -> Result<Vec<(Value, Value)>, CallError>

since: 4
Source§

fn get_api_info(&mut self) -> Result<Vec<Value>, CallError>

since: 1
Source§

fn set_client_info( &mut self, name: &str, version: Vec<(Value, Value)>, typ: &str, methods: Vec<(Value, Value)>, attributes: Vec<(Value, Value)>, ) -> Result<(), CallError>

since: 4
Source§

fn get_chan_info(&mut self, chan: i64) -> Result<Vec<(Value, Value)>, CallError>

since: 4
Source§

fn list_chans(&mut self) -> Result<Vec<Value>, CallError>

since: 4
Source§

fn call_atomic(&mut self, calls: Vec<Value>) -> Result<Vec<Value>, CallError>

since: 1
Source§

fn parse_expression( &mut self, expr: &str, flags: &str, highlight: bool, ) -> Result<Vec<(Value, Value)>, CallError>

since: 4
Source§

fn list_uis(&mut self) -> Result<Vec<Value>, CallError>

since: 4
Source§

fn get_proc_children(&mut self, pid: i64) -> Result<Vec<Value>, CallError>

since: 4
Source§

fn get_proc(&mut self, pid: i64) -> Result<Value, CallError>

since: 4
Source§

impl NeovimApiAsync for Neovim

Source§

fn ui_detach_async(&mut self) -> AsyncCall<'_, ()>

since: 1
Source§

fn ui_try_resize_async(&mut self, width: i64, height: i64) -> AsyncCall<'_, ()>

since: 1
Source§

fn ui_set_option_async(&mut self, name: &str, value: Value) -> AsyncCall<'_, ()>

since: 1
Source§

fn command_async(&mut self, command: &str) -> AsyncCall<'_, ()>

since: 1
Source§

fn get_hl_by_name_async( &mut self, name: &str, rgb: bool, ) -> AsyncCall<'_, Vec<(Value, Value)>>

since: 3
Source§

fn get_hl_by_id_async( &mut self, hl_id: i64, rgb: bool, ) -> AsyncCall<'_, Vec<(Value, Value)>>

since: 3
Source§

fn feedkeys_async( &mut self, keys: &str, mode: &str, escape_csi: bool, ) -> AsyncCall<'_, ()>

since: 1
Source§

fn input_async(&mut self, keys: &str) -> AsyncCall<'_, i64>

since: 1
Source§

fn replace_termcodes_async( &mut self, str: &str, from_part: bool, do_lt: bool, special: bool, ) -> AsyncCall<'_, String>

since: 1
Source§

fn command_output_async(&mut self, command: &str) -> AsyncCall<'_, String>

since: 1
Source§

fn eval_async(&mut self, expr: &str) -> AsyncCall<'_, Value>

since: 1
Source§

fn execute_lua_async( &mut self, code: &str, args: Vec<Value>, ) -> AsyncCall<'_, Value>

since: 3
Source§

fn call_function_async( &mut self, fname: &str, args: Vec<Value>, ) -> AsyncCall<'_, Value>

since: 1
Source§

fn call_dict_function_async( &mut self, dict: Value, fname: &str, args: Vec<Value>, ) -> AsyncCall<'_, Value>

since: 4
Source§

fn strwidth_async(&mut self, text: &str) -> AsyncCall<'_, i64>

since: 1
Source§

fn list_runtime_paths_async(&mut self) -> AsyncCall<'_, Vec<String>>

since: 1
Source§

fn set_current_dir_async(&mut self, dir: &str) -> AsyncCall<'_, ()>

since: 1
Source§

fn get_current_line_async(&mut self) -> AsyncCall<'_, String>

since: 1
Source§

fn set_current_line_async(&mut self, line: &str) -> AsyncCall<'_, ()>

since: 1
Source§

fn del_current_line_async(&mut self) -> AsyncCall<'_, ()>

since: 1
Source§

fn get_var_async(&mut self, name: &str) -> AsyncCall<'_, Value>

since: 1
Source§

fn set_var_async(&mut self, name: &str, value: Value) -> AsyncCall<'_, ()>

since: 1
Source§

fn del_var_async(&mut self, name: &str) -> AsyncCall<'_, ()>

since: 1
Source§

fn get_vvar_async(&mut self, name: &str) -> AsyncCall<'_, Value>

since: 1
Source§

fn get_option_async(&mut self, name: &str) -> AsyncCall<'_, Value>

since: 1
Source§

fn set_option_async(&mut self, name: &str, value: Value) -> AsyncCall<'_, ()>

since: 1
Source§

fn out_write_async(&mut self, str: &str) -> AsyncCall<'_, ()>

since: 1
Source§

fn err_write_async(&mut self, str: &str) -> AsyncCall<'_, ()>

since: 1
Source§

fn err_writeln_async(&mut self, str: &str) -> AsyncCall<'_, ()>

since: 1
Source§

fn list_bufs_async(&mut self) -> AsyncCall<'_, Vec<Buffer>>

since: 1
Source§

fn get_current_buf_async(&mut self) -> AsyncCall<'_, Buffer>

since: 1
Source§

fn set_current_buf_async(&mut self, buffer: &Buffer) -> AsyncCall<'_, ()>

since: 1
Source§

fn list_wins_async(&mut self) -> AsyncCall<'_, Vec<Window>>

since: 1
Source§

fn get_current_win_async(&mut self) -> AsyncCall<'_, Window>

since: 1
Source§

fn set_current_win_async(&mut self, window: &Window) -> AsyncCall<'_, ()>

since: 1
Source§

fn list_tabpages_async(&mut self) -> AsyncCall<'_, Vec<Tabpage>>

since: 1
Source§

fn get_current_tabpage_async(&mut self) -> AsyncCall<'_, Tabpage>

since: 1
Source§

fn set_current_tabpage_async(&mut self, tabpage: &Tabpage) -> AsyncCall<'_, ()>

since: 1
Source§

fn create_namespace_async(&mut self, name: &str) -> AsyncCall<'_, i64>

since: 5
Source§

fn get_namespaces_async(&mut self) -> AsyncCall<'_, Vec<(Value, Value)>>

since: 5
Source§

fn subscribe_async(&mut self, event: &str) -> AsyncCall<'_, ()>

since: 1
Source§

fn unsubscribe_async(&mut self, event: &str) -> AsyncCall<'_, ()>

since: 1
Source§

fn get_color_by_name_async(&mut self, name: &str) -> AsyncCall<'_, i64>

since: 1
Source§

fn get_color_map_async(&mut self) -> AsyncCall<'_, Vec<(Value, Value)>>

since: 1
Source§

fn get_mode_async(&mut self) -> AsyncCall<'_, Vec<(Value, Value)>>

since: 2
Source§

fn get_keymap_async( &mut self, mode: &str, ) -> AsyncCall<'_, Vec<Vec<(Value, Value)>>>

since: 3
Source§

fn get_commands_async( &mut self, opts: Vec<(Value, Value)>, ) -> AsyncCall<'_, Vec<(Value, Value)>>

since: 4
Source§

fn get_api_info_async(&mut self) -> AsyncCall<'_, Vec<Value>>

since: 1
Source§

fn set_client_info_async( &mut self, name: &str, version: Vec<(Value, Value)>, typ: &str, methods: Vec<(Value, Value)>, attributes: Vec<(Value, Value)>, ) -> AsyncCall<'_, ()>

since: 4
Source§

fn get_chan_info_async( &mut self, chan: i64, ) -> AsyncCall<'_, Vec<(Value, Value)>>

since: 4
Source§

fn list_chans_async(&mut self) -> AsyncCall<'_, Vec<Value>>

since: 4
Source§

fn call_atomic_async(&mut self, calls: Vec<Value>) -> AsyncCall<'_, Vec<Value>>

since: 1
Source§

fn parse_expression_async( &mut self, expr: &str, flags: &str, highlight: bool, ) -> AsyncCall<'_, Vec<(Value, Value)>>

since: 4
Source§

fn list_uis_async(&mut self) -> AsyncCall<'_, Vec<Value>>

since: 4
Source§

fn get_proc_children_async(&mut self, pid: i64) -> AsyncCall<'_, Vec<Value>>

since: 4
Source§

fn get_proc_async(&mut self, pid: i64) -> AsyncCall<'_, Value>

since: 4

Auto Trait Implementations§

§

impl Freeze for Neovim

§

impl !RefUnwindSafe for Neovim

§

impl Send for Neovim

§

impl Sync for Neovim

§

impl Unpin for Neovim

§

impl !UnwindSafe for Neovim

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.