bug fixed
This commit is contained in:
parent
cd6dbe0429
commit
84c971ac62
|
@ -2,11 +2,11 @@ use std::fmt;
|
|||
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Error {
|
||||
#[prost(int32, tag="1")]
|
||||
#[prost(int32, tag = "1")]
|
||||
pub code: i32,
|
||||
#[prost(string, tag="2")]
|
||||
#[prost(string, tag = "2")]
|
||||
pub message: ::prost::alloc::string::String,
|
||||
#[prost(bytes="vec", optional, tag="3")]
|
||||
#[prost(bytes = "vec", optional, tag = "3")]
|
||||
pub data: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
|
||||
}
|
||||
|
||||
|
@ -18,9 +18,9 @@ impl fmt::Display for Error {
|
|||
self.code, self.message, self.data
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Error {
|
||||
impl Error {
|
||||
pub const PARSE: i32 = -32700;
|
||||
pub const INVALID_REQUEST: i32 = -32600;
|
||||
pub const INVALID_PARAMS: i32 = -32602;
|
||||
|
@ -125,20 +125,19 @@ impl fmt::Display for Error {
|
|||
pub const SERVER_97: i32 = -32097;
|
||||
pub const SERVER_98: i32 = -32098;
|
||||
pub const SERVER_99: i32 = -32099;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct InvalidParamsDetail {
|
||||
#[prost(string, tag="1")]
|
||||
#[prost(string, tag = "1")]
|
||||
pub location: ::prost::alloc::string::String,
|
||||
#[prost(string, tag="2")]
|
||||
#[prost(string, tag = "2")]
|
||||
pub param: ::prost::alloc::string::String,
|
||||
#[prost(string, tag="3")]
|
||||
#[prost(string, tag = "3")]
|
||||
pub value: ::prost::alloc::string::String,
|
||||
#[prost(enumeration="InvalidParamsType", tag="4")]
|
||||
#[prost(enumeration = "InvalidParamsType", tag = "4")]
|
||||
pub error_type: i32,
|
||||
#[prost(string, tag="5")]
|
||||
#[prost(string, tag = "5")]
|
||||
pub message: ::prost::alloc::string::String,
|
||||
}
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||
|
@ -157,7 +156,6 @@ pub enum InvalidParamsType {
|
|||
Url = 10,
|
||||
}
|
||||
|
||||
|
||||
impl From<i32> for InvalidParamsType {
|
||||
fn from(s: i32) -> Self {
|
||||
match s {
|
||||
|
@ -174,5 +172,4 @@ impl From<i32> for InvalidParamsType {
|
|||
_ => InvalidParamsType::None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user