pub enum ClientError {
ConnectionFailed(Error),
Io(Error),
DaemonError(String),
LspError {
code: i32,
message: String,
},
SpawnFailed(Error),
SpawnTimeout,
DaemonBinaryNotFound(String),
ProtocolError(String),
InitializationFailed(String),
}Expand description
Errors that can occur when using LspClient.
§Connection errors
ConnectionFailed– Failed to connect to the daemon’s Unix socket.SpawnFailed– The client tried to auto-spawn a daemon process but the spawn failed.SpawnTimeout– A daemon was spawned but didn’t become ready within the timeout window.DaemonBinaryNotFound– Theaether-lspdbinary could not be found onPATHor in known locations.InitializationFailed– Connected to the daemon but theInitializehandshake was rejected.
§Runtime errors
Io– An IO error on the Unix socket connection.DaemonError– The daemon returned a protocol-level error.ProtocolError– A framing or serialization error in the daemon protocol.
§LSP errors
LspError– The language server returned an error response. Contains the LSP errorcodeandmessage(e.g. “method not supported”, “request failed”).
Variants§
ConnectionFailed(Error)
Io(Error)
DaemonError(String)
LspError
SpawnFailed(Error)
SpawnTimeout
DaemonBinaryNotFound(String)
ProtocolError(String)
InitializationFailed(String)
Trait Implementations§
Source§impl Debug for ClientError
impl Debug for ClientError
Source§impl Display for ClientError
impl Display for ClientError
Source§impl Error for ClientError
impl Error for ClientError
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()
Auto Trait Implementations§
impl Freeze for ClientError
impl !RefUnwindSafe for ClientError
impl Send for ClientError
impl Sync for ClientError
impl Unpin for ClientError
impl UnsafeUnpin for ClientError
impl !UnwindSafe for ClientError
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