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§
source§impl Clone for InvalidMessage
impl Clone for InvalidMessage
source§fn clone(&self) -> InvalidMessage
fn clone(&self) -> InvalidMessage
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for InvalidMessage
impl Debug for InvalidMessage
source§impl Display for InvalidMessage
impl Display for InvalidMessage
source§impl Error for InvalidMessage
impl Error for InvalidMessage
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<InvalidMessage> for Box<DecodeError>
impl From<InvalidMessage> for Box<DecodeError>
source§fn from(err: InvalidMessage) -> Box<DecodeError>
fn from(err: InvalidMessage) -> Box<DecodeError>
Converts to this type from the input type.
source§impl PartialEq<InvalidMessage> for InvalidMessage
impl PartialEq<InvalidMessage> for InvalidMessage
source§fn 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 ==
.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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more