pub enum RustMethError {
Io(Error),
Json(Error),
ParseInt(ParseIntError),
NoContentLength,
RecvExhausted {
limit: usize,
},
UnexpectedResponseShape(String),
RustAnalyzerNotFound,
MissingStdin,
MissingStdout,
TypeNotFound {
type_name: String,
message: String,
},
Timeout {
type_name: String,
waited_secs: u64,
},
FeatureGated {
type_name: String,
message: String,
},
}Expand description
The primary error tracking type for operations within the library.
Encapsulates platform errors (I/O, parsing) along with specific failure modes encountered during synchronization or communication with the underlying Language Server Protocol (LSP).
Variants§
Io(Error)
Errors originating from direct operating system interaction or file system operations.
Json(Error)
Errors resulting from failed JSON serialization or deserialization routines.
ParseInt(ParseIntError)
Errors resulting from failed string-to-integer conversions.
NoContentLength
Indication that an unexpected byte payload was read from the language server stream
due to a missing or improperly formed Content-Length header field.
RecvExhausted
Raised when looking for a specific LSP message payload, but the message loop bounds were reached before a match was resolved.
UnexpectedResponseShape(String)
Raised when rust-analyzer returns a payload structurally valid as JSON, but lacking
the fields or nested objects required by the expected API model contract.
RustAnalyzerNotFound
Indicates that the rust-analyzer executable engine could not be discovered
via the host path environment or native component directory.
MissingStdin
Indicates that the child process’s stdin handle was not captured, typically because
it was not spawned with Stdio::piped().
MissingStdout
Indicates that the child process’s stdout handle was not captured, typically because
it was not spawned with Stdio::piped().
TypeNotFound
Raised when rust-analyzer reports a diagnostic error for the probed type, indicating the type does not exist in scope (e.g. a typo or non-existent type).
Fields
Timeout
Raised when rust-analyzer fails to produce a usable response within the
configured retry budget e.g. a dependency-heavy crate is still being
fetched/indexed, or rust-analyzer itself has hung.
FeatureGated
Raised when rust-analyzer resolves the path but reports the item was
“configured out” i.e. it exists in the crate but requires a Cargo
feature flag that wasn’t enabled for the probe. The user should retry
with an explicit --deps override enabling the required feature.
Trait Implementations§
Source§impl Debug for RustMethError
impl Debug for RustMethError
Source§impl Display for RustMethError
impl Display for RustMethError
Source§impl Error for RustMethError
impl Error for RustMethError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()