[][src]Enum nvim_rs::error::CallError

pub enum CallError {
    SendError(EncodeErrorString),
    InternalReceiveError(RecvErrorString),
    DecodeError(Arc<DecodeError>, String),
    NeovimError(Option<i64>, String),
}

A call to neovim failed

The API functions return this, as they are just proxies for call.

Variants

SendError(EncodeErrorString)

Sending the request to neovim has failed.

Fields:

  1. The underlying error
  2. The name of the called method
InternalReceiveError(RecvErrorString)

The internal channel to send the response to the right task was closed. This really should not happen, unless someone manages to kill individual tasks.

Fields:

  1. The underlying error
  2. The name of the called method
DecodeError(Arc<DecodeError>, String)

Decoding neovim's response failed.

Fields:

  1. The underlying error
  2. The name of the called method

Note: DecodeError can't be Clone, so we Arc-wrap it

NeovimError(Option<i64>, String)

Neovim encountered an error while executing the reqest.

Fields:

  1. Neovim's error type (see :h api)
  2. Neovim's error message

Methods

impl CallError[src]

pub fn is_channel_closed(&self) -> bool[src]

Determine if the error originated from a closed channel. This is generally used to close a plugin from neovim's side, and so most of the time should not be treated as a real error, but a signal to finish the program.

Trait Implementations

impl Debug for CallError[src]

impl Display for CallError[src]

impl Error for CallError[src]

Auto Trait Implementations

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> ToString for T where
    T: Display + ?Sized
[src]

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.