Enum nvim_rs::error::InvalidMessage
source · [−]pub enum InvalidMessage {
NotAnArray(Value),
WrongArrayLength(RangeInclusive<u64>, u64),
InvalidType(Value),
UnknownMessageType(u64),
InvalidParams(Value, String),
InvalidNotificationName(Value),
InvalidRequestName(u64, Value),
InvalidMsgid(Value),
}
Expand description
A message from neovim had an invalid format
This should be very basically non-existent, since it would indicate a bug in neovim.
Variants
NotAnArray(Value)
The value read was not an array
WrongArrayLength(RangeInclusive<u64>, u64)
WrongArrayLength(should, is) means that the array should have length in
the range should
, but has length is
InvalidType(Value)
The first array element (=the message type) was not decodable into a u64
UnknownMessageType(u64)
The first array element (=the message type) was decodable into a u64 larger than 2
InvalidParams(Value, String)
The params of a request or notification weren’t an array
InvalidNotificationName(Value)
The method name of a notification was not decodable into a String
InvalidRequestName(u64, Value)
The method name of a request was not decodable into a String
InvalidMsgid(Value)
The msgid of a request or response was not decodable into a u64
Trait Implementations
sourceimpl Clone for InvalidMessage
impl Clone for InvalidMessage
sourcefn clone(&self) -> InvalidMessage
fn clone(&self) -> InvalidMessage
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for InvalidMessage
impl Debug for InvalidMessage
sourceimpl Display for InvalidMessage
impl Display for InvalidMessage
sourceimpl Error for InvalidMessage
impl Error for InvalidMessage
1.30.0 · 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()
sourceimpl From<InvalidMessage> for Box<DecodeError>
impl From<InvalidMessage> for Box<DecodeError>
sourcefn from(err: InvalidMessage) -> Box<DecodeError>
fn from(err: InvalidMessage) -> Box<DecodeError>
Converts to this type from the input type.
sourceimpl PartialEq<InvalidMessage> for InvalidMessage
impl PartialEq<InvalidMessage> for InvalidMessage
sourcefn eq(&self, other: &InvalidMessage) -> bool
fn eq(&self, other: &InvalidMessage) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &InvalidMessage) -> bool
fn ne(&self, other: &InvalidMessage) -> bool
This method tests for !=
.
impl StructuralPartialEq for InvalidMessage
Auto Trait Implementations
impl RefUnwindSafe for InvalidMessage
impl Send for InvalidMessage
impl Sync for InvalidMessage
impl Unpin for InvalidMessage
impl UnwindSafe for InvalidMessage
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more