pub enum CallError {
SendError(EncodeError, String),
InternalReceiveError(Canceled, String),
DecodeError(Arc<DecodeError>, String),
NeovimError(Option<i64>, String),
WrongValueType(Value),
}
Expand description
Variants
SendError(EncodeError, String)
Sending the request to neovim has failed.
Fields:
- The underlying error
- The name of the called method
InternalReceiveError(Canceled, String)
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:
- The underlying error
- The name of the called method
DecodeError(Arc<DecodeError>, String)
Decoding neovim’s response failed.
Fields:
- The underlying error
- 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:
- Neovim’s error type (see
:h api
) - Neovim’s error message
WrongValueType(Value)
The response from neovim contained a Value
of the wrong
type
Implementations
sourceimpl CallError
impl CallError
sourcepub fn is_channel_closed(&self) -> bool
pub fn is_channel_closed(&self) -> bool
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
sourceimpl Error for CallError
impl Error for CallError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations
impl !RefUnwindSafe for CallError
impl Send for CallError
impl Sync for CallError
impl Unpin for CallError
impl !UnwindSafe for CallError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more