pub enum ParseError {
Body(Error),
Encode(Error),
Headers(Error),
InvalidContentType,
InvalidContentLength(String),
MissingContentLength,
Utf8(Utf8Error),
ContentLengthTooLarge(usize),
HeadersTooLarge,
EmptyMessage,
EnvelopeViolation(String),
}Expand description
Errors that can occur when processing an LSP message.
Variants§
Body(Error)
Failed to parse the JSON body.
Encode(Error)
Failed to encode the response.
Headers(Error)
Failed to parse headers.
InvalidContentType
The media type in the Content-Type header is invalid.
InvalidContentLength(String)
The length value in the Content-Length header is invalid.
MissingContentLength
Request lacks the required Content-Length header.
Utf8(Utf8Error)
Request contains invalid UTF8.
ContentLengthTooLarge(usize)
The specified Content-Length exceeds the maximum limit.
HeadersTooLarge
The parsed headers exceed the maximum size.
EmptyMessage
The message is zero-length.
EnvelopeViolation(String)
The message violates JSON-RPC 2.0 envelope constraints.
Trait Implementations§
Source§impl Debug for ParseError
impl Debug for ParseError
Source§impl Display for ParseError
impl Display for ParseError
Source§impl Error for ParseError
impl Error for ParseError
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<Error> for ParseError
impl From<Error> for ParseError
Source§impl From<Error> for ParseError
impl From<Error> for ParseError
Source§impl From<Error> for ParseError
impl From<Error> for ParseError
Auto Trait Implementations§
impl !RefUnwindSafe for ParseError
impl !UnwindSafe for ParseError
impl Freeze for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnsafeUnpin for ParseError
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