pub enum Error {
Show 16 variants
Protocol(ProtocolError),
MessageSend(String),
MessageReceive(String),
TomlParse {
uri: String,
message: String,
},
RustParse {
uri: String,
message: String,
},
EnvVarSyntax {
uri: String,
line: u32,
message: String,
},
ConfigValidation {
uri: String,
message: String,
},
RouteValidation {
uri: String,
message: String,
},
DiValidation {
uri: String,
message: String,
},
SchemaLoad(String),
Config(String),
Io(Error),
Json(Error),
Http(Error),
IndexBuild(String),
Other(Error),
}Expand description
spring-lsp 错误类型
Variants§
Protocol(ProtocolError)
LSP 协议错误
MessageSend(String)
消息发送错误
MessageReceive(String)
消息接收错误
TomlParse
TOML 解析错误
RustParse
Rust 语法解析错误
EnvVarSyntax
环境变量插值语法错误
ConfigValidation
配置验证错误
RouteValidation
路由验证错误
DiValidation
依赖注入验证错误
SchemaLoad(String)
Schema 加载错误
Config(String)
配置错误
Io(Error)
文件 I/O 错误
Json(Error)
JSON 序列化/反序列化错误
Http(Error)
HTTP 请求错误
IndexBuild(String)
索引构建错误
Other(Error)
其他错误
Implementations§
Source§impl Error
impl Error
Sourcepub fn category(&self) -> ErrorCategory
pub fn category(&self) -> ErrorCategory
获取错误类别
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
判断错误是否可恢复
Sourcepub fn severity(&self) -> ErrorSeverity
pub fn severity(&self) -> ErrorSeverity
获取错误的严重程度
Sourcepub fn document_uri(&self) -> Option<&str>
pub fn document_uri(&self) -> Option<&str>
获取错误的文档 URI(如果有)
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<ProtocolError> for Error
impl From<ProtocolError> for Error
Source§fn from(source: ProtocolError) -> Self
fn from(source: ProtocolError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more