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 duplicate 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)>
Returns 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 for InvalidMessage
impl PartialEq for InvalidMessage
impl StructuralPartialEq for InvalidMessage
Auto Trait Implementations§
impl Freeze for InvalidMessage
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