[][src]Struct nvim_rs::neovim::Neovim

pub struct Neovim<W> where
    W: AsyncWrite + Send + Unpin + 'static, 
{ /* fields omitted */ }

An active Neovim session.

Methods

impl<W> Neovim<W> where
    W: AsyncWrite + Send + Sync + Unpin + 'static, 
[src]

pub fn new<H, R>(
    reader: R,
    writer: W,
    handler: H
) -> (Neovim<<H as Handler>::Writer>, impl Future<Output = Result<(), Box<LoopError>>>) where
    R: AsyncRead + Send + Unpin + 'static,
    H: Handler<Writer = W> + Send + 'static, 
[src]

pub async fn call<'_, '_>(
    &'_ self,
    method: &'_ str,
    args: Vec<Value>
) -> Result<Result<Value, Value>, Box<CallError>>
[src]

pub async fn ui_attach<'_, '_>(
    &'_ mut self,
    width: i64,
    height: i64,
    opts: &'_ UiAttachOptions
) -> Result<(), Box<CallError>>
[src]

Register as a remote UI.

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

pub async fn quit_no_save<'_>(&'_ mut self) -> Result<(), Box<CallError>>[src]

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

impl<W> Neovim<W> where
    W: AsyncWrite + Send + Sync + Unpin + 'static, 
[src]

pub async fn ui_detach<'_>(&'_ self) -> Result<(), Box<CallError>>[src]

pub async fn ui_try_resize<'_>(
    &'_ self,
    width: i64,
    height: i64
) -> Result<(), Box<CallError>>
[src]

pub async fn ui_set_option<'_, '_>(
    &'_ self,
    name: &'_ str,
    value: Value
) -> Result<(), Box<CallError>>
[src]

pub async fn ui_try_resize_grid<'_>(
    &'_ self,
    grid: i64,
    width: i64,
    height: i64
) -> Result<(), Box<CallError>>
[src]

pub async fn ui_pum_set_height<'_>(
    &'_ self,
    height: i64
) -> Result<(), Box<CallError>>
[src]

pub async fn exec<'_, '_>(
    &'_ self,
    src: &'_ str,
    output: bool
) -> Result<String, Box<CallError>>
[src]

pub async fn command<'_, '_>(
    &'_ self,
    command: &'_ str
) -> Result<(), Box<CallError>>
[src]

pub async fn get_hl_by_name<'_, '_>(
    &'_ self,
    name: &'_ str,
    rgb: bool
) -> Result<Vec<(Value, Value)>, Box<CallError>>
[src]

pub async fn get_hl_by_id<'_>(
    &'_ self,
    hl_id: i64,
    rgb: bool
) -> Result<Vec<(Value, Value)>, Box<CallError>>
[src]

pub async fn feedkeys<'_, '_, '_>(
    &'_ self,
    keys: &'_ str,
    mode: &'_ str,
    escape_csi: bool
) -> Result<(), Box<CallError>>
[src]

pub async fn input<'_, '_>(
    &'_ self,
    keys: &'_ str
) -> Result<i64, Box<CallError>>
[src]

pub async fn input_mouse<'_, '_, '_, '_>(
    &'_ self,
    button: &'_ str,
    action: &'_ str,
    modifier: &'_ str,
    grid: i64,
    row: i64,
    col: i64
) -> Result<(), Box<CallError>>
[src]

pub async fn replace_termcodes<'_, '_>(
    &'_ self,
    str: &'_ str,
    from_part: bool,
    do_lt: bool,
    special: bool
) -> Result<String, Box<CallError>>
[src]

pub async fn command_output<'_, '_>(
    &'_ self,
    command: &'_ str
) -> Result<String, Box<CallError>>
[src]

pub async fn eval<'_, '_>(
    &'_ self,
    expr: &'_ str
) -> Result<Value, Box<CallError>>
[src]

pub async fn execute_lua<'_, '_>(
    &'_ self,
    code: &'_ str,
    args: Vec<Value>
) -> Result<Value, Box<CallError>>
[src]

pub async fn exec_lua<'_, '_>(
    &'_ self,
    code: &'_ str,
    args: Vec<Value>
) -> Result<Value, Box<CallError>>
[src]

pub async fn call_function<'_, '_>(
    &'_ self,
    fname: &'_ str,
    args: Vec<Value>
) -> Result<Value, Box<CallError>>
[src]

pub async fn call_dict_function<'_, '_>(
    &'_ self,
    dict: Value,
    fname: &'_ str,
    args: Vec<Value>
) -> Result<Value, Box<CallError>>
[src]

pub async fn strwidth<'_, '_>(
    &'_ self,
    text: &'_ str
) -> Result<i64, Box<CallError>>
[src]

pub async fn list_runtime_paths<'_>(
    &'_ self
) -> Result<Vec<String>, Box<CallError>>
[src]

pub async fn set_current_dir<'_, '_>(
    &'_ self,
    dir: &'_ str
) -> Result<(), Box<CallError>>
[src]

pub async fn get_current_line<'_>(&'_ self) -> Result<String, Box<CallError>>[src]

pub async fn set_current_line<'_, '_>(
    &'_ self,
    line: &'_ str
) -> Result<(), Box<CallError>>
[src]

pub async fn del_current_line<'_>(&'_ self) -> Result<(), Box<CallError>>[src]

pub async fn get_var<'_, '_>(
    &'_ self,
    name: &'_ str
) -> Result<Value, Box<CallError>>
[src]

pub async fn set_var<'_, '_>(
    &'_ self,
    name: &'_ str,
    value: Value
) -> Result<(), Box<CallError>>
[src]

pub async fn del_var<'_, '_>(
    &'_ self,
    name: &'_ str
) -> Result<(), Box<CallError>>
[src]

pub async fn get_vvar<'_, '_>(
    &'_ self,
    name: &'_ str
) -> Result<Value, Box<CallError>>
[src]

pub async fn set_vvar<'_, '_>(
    &'_ self,
    name: &'_ str,
    value: Value
) -> Result<(), Box<CallError>>
[src]

pub async fn get_option<'_, '_>(
    &'_ self,
    name: &'_ str
) -> Result<Value, Box<CallError>>
[src]

pub async fn set_option<'_, '_>(
    &'_ self,
    name: &'_ str,
    value: Value
) -> Result<(), Box<CallError>>
[src]

pub async fn out_write<'_, '_>(
    &'_ self,
    str: &'_ str
) -> Result<(), Box<CallError>>
[src]

pub async fn err_write<'_, '_>(
    &'_ self,
    str: &'_ str
) -> Result<(), Box<CallError>>
[src]

pub async fn err_writeln<'_, '_>(
    &'_ self,
    str: &'_ str
) -> Result<(), Box<CallError>>
[src]

pub async fn set_current_buf<'_, '_>(
    &'_ self,
    buffer: &'_ Buffer<W>
) -> Result<(), Box<CallError>>
[src]

pub async fn set_current_win<'_, '_>(
    &'_ self,
    window: &'_ Window<W>
) -> Result<(), Box<CallError>>
[src]

pub async fn set_current_tabpage<'_, '_>(
    &'_ self,
    tabpage: &'_ Tabpage<W>
) -> Result<(), Box<CallError>>
[src]

pub async fn create_namespace<'_, '_>(
    &'_ self,
    name: &'_ str
) -> Result<i64, Box<CallError>>
[src]

pub async fn get_namespaces<'_>(
    &'_ self
) -> Result<Vec<(Value, Value)>, Box<CallError>>
[src]

pub async fn paste<'_, '_>(
    &'_ self,
    data: &'_ str,
    crlf: bool,
    phase: i64
) -> Result<bool, Box<CallError>>
[src]

pub async fn put<'_, '_>(
    &'_ self,
    lines: Vec<String>,
    typ: &'_ str,
    after: bool,
    follow: bool
) -> Result<(), Box<CallError>>
[src]

pub async fn subscribe<'_, '_>(
    &'_ self,
    event: &'_ str
) -> Result<(), Box<CallError>>
[src]

pub async fn unsubscribe<'_, '_>(
    &'_ self,
    event: &'_ str
) -> Result<(), Box<CallError>>
[src]

pub async fn get_color_by_name<'_, '_>(
    &'_ self,
    name: &'_ str
) -> Result<i64, Box<CallError>>
[src]

pub async fn get_color_map<'_>(
    &'_ self
) -> Result<Vec<(Value, Value)>, Box<CallError>>
[src]

pub async fn get_context<'_>(
    &'_ self,
    opts: Vec<(Value, Value)>
) -> Result<Vec<(Value, Value)>, Box<CallError>>
[src]

pub async fn load_context<'_>(
    &'_ self,
    dict: Vec<(Value, Value)>
) -> Result<Value, Box<CallError>>
[src]

pub async fn get_mode<'_>(
    &'_ self
) -> Result<Vec<(Value, Value)>, Box<CallError>>
[src]

pub async fn get_keymap<'_, '_>(
    &'_ self,
    mode: &'_ str
) -> Result<Vec<Vec<(Value, Value)>>, Box<CallError>>
[src]

pub async fn set_keymap<'_, '_, '_, '_>(
    &'_ self,
    mode: &'_ str,
    lhs: &'_ str,
    rhs: &'_ str,
    opts: Vec<(Value, Value)>
) -> Result<(), Box<CallError>>
[src]

pub async fn del_keymap<'_, '_, '_>(
    &'_ self,
    mode: &'_ str,
    lhs: &'_ str
) -> Result<(), Box<CallError>>
[src]

pub async fn get_commands<'_>(
    &'_ self,
    opts: Vec<(Value, Value)>
) -> Result<Vec<(Value, Value)>, Box<CallError>>
[src]

pub async fn get_api_info<'_>(&'_ self) -> Result<Vec<Value>, Box<CallError>>[src]

pub async fn set_client_info<'_, '_, '_>(
    &'_ self,
    name: &'_ str,
    version: Vec<(Value, Value)>,
    typ: &'_ str,
    methods: Vec<(Value, Value)>,
    attributes: Vec<(Value, Value)>
) -> Result<(), Box<CallError>>
[src]

pub async fn get_chan_info<'_>(
    &'_ self,
    chan: i64
) -> Result<Vec<(Value, Value)>, Box<CallError>>
[src]

pub async fn list_chans<'_>(&'_ self) -> Result<Vec<Value>, Box<CallError>>[src]

pub async fn call_atomic<'_>(
    &'_ self,
    calls: Vec<Value>
) -> Result<Vec<Value>, Box<CallError>>
[src]

pub async fn parse_expression<'_, '_, '_>(
    &'_ self,
    expr: &'_ str,
    flags: &'_ str,
    highlight: bool
) -> Result<Vec<(Value, Value)>, Box<CallError>>
[src]

pub async fn list_uis<'_>(&'_ self) -> Result<Vec<Value>, Box<CallError>>[src]

pub async fn get_proc_children<'_>(
    &'_ self,
    pid: i64
) -> Result<Vec<Value>, Box<CallError>>
[src]

pub async fn get_proc<'_>(&'_ self, pid: i64) -> Result<Value, Box<CallError>>[src]

pub async fn select_popupmenu_item<'_>(
    &'_ self,
    item: i64,
    insert: bool,
    finish: bool,
    opts: Vec<(Value, Value)>
) -> Result<(), Box<CallError>>
[src]

impl<W> Neovim<W> where
    W: AsyncWrite + Send + Sync + Unpin + 'static, 
[src]

pub async fn list_bufs<'_>(&'_ self) -> Result<Vec<Buffer<W>>, Box<CallError>>[src]

pub async fn get_current_buf<'_>(&'_ self) -> Result<Buffer<W>, Box<CallError>>[src]

pub async fn list_wins<'_>(&'_ self) -> Result<Vec<Window<W>>, Box<CallError>>[src]

pub async fn get_current_win<'_>(&'_ self) -> Result<Window<W>, Box<CallError>>[src]

pub async fn create_buf<'_>(
    &'_ self,
    listed: bool,
    scratch: bool
) -> Result<Buffer<W>, Box<CallError>>
[src]

pub async fn open_win<'_, '_>(
    &'_ self,
    buffer: &'_ Buffer<W>,
    enter: bool,
    config: Vec<(Value, Value)>
) -> Result<Window<W>, Box<CallError>>
[src]

pub async fn list_tabpages<'_>(
    &'_ self
) -> Result<Vec<Tabpage<W>>, Box<CallError>>
[src]

pub async fn get_current_tabpage<'_>(
    &'_ self
) -> Result<Tabpage<W>, Box<CallError>>
[src]

Trait Implementations

impl<W> Clone for Neovim<W> where
    W: AsyncWrite + Send + Unpin + 'static, 
[src]

Auto Trait Implementations

impl<W> !RefUnwindSafe for Neovim<W>

impl<W> Send for Neovim<W>

impl<W> Sync for Neovim<W>

impl<W> Unpin for Neovim<W>

impl<W> !UnwindSafe for Neovim<W>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.