#[repr(i32)]pub enum ErrorCode {
ParseError = -32_700,
InvalidRequest = -32_600,
MethodNotFound = -32_601,
InvalidParams = -32_602,
InternalError = -32_603,
ServerNotInitialized = -32_002,
UnknownErrorCode = -32_001,
RequestFailed = -32_803,
ServerCancelled = -32_802,
ContentModified = -32_801,
RequestCancelled = -32_800,
}Expand description
LSP and JSON-RPC 2.0 error codes.
These error codes are defined by the JSON-RPC 2.0 specification and the LSP specification.
The codes are represented as i32 values using #[repr(i32)].
§Error Code Ranges
-32700to-32600: JSON-RPC 2.0 defined errors-32099to-32000: JSON-RPC reserved for implementation-defined server errors-32899to-32800: LSP reserved for LSP-specific errors
Variants§
ParseError = -32_700
Invalid JSON was received by the server.
InvalidRequest = -32_600
The JSON sent is not a valid Request object.
MethodNotFound = -32_601
The method does not exist / is not available.
InvalidParams = -32_602
Invalid method parameter(s).
InternalError = -32_603
Internal JSON-RPC error.
ServerNotInitialized = -32_002
The server has not been initialized.
UnknownErrorCode = -32_001
Unknown error code (used for unmapped errors).
RequestFailed = -32_803
A request failed but it was syntactically correct.
ServerCancelled = -32_802
The server cancelled the request.
ContentModified = -32_801
The server detected that the content of a document got modified outside normal conditions.
RequestCancelled = -32_800
The client has canceled a request and a server has detected the cancel.
Trait Implementations§
impl Copy for ErrorCode
impl Eq for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnsafeUnpin for ErrorCode
impl UnwindSafe for ErrorCode
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