pub enum RequestError {
UnreadableParams,
UnreadableFrame,
MissingId,
IdMismatch {
expected: String,
found: String,
},
MissingResult,
ResultNotAnObject,
PeerError {
code: IrErrorCode,
message: String,
data: Option<String>,
},
}Expand description
Why a document could not be built, or a frame could not be read as one.
Variants§
UnreadableParams
The parameters could not be read back as JSON.
Unreachable for a JsonObject, which validated the text it stores.
UnreadableFrame
A frame that was handed to reply_result is not a JSON object.
MissingId
A reply carried no id, so there is nothing to match the request against.
IdMismatch
The frame answers a request other than the one being read.
Fields
MissingResult
The frame is a JSON-RPC object with neither a result nor an error.
ResultNotAnObject
The result was present but was not a JSON object.
PeerError
The peer reported a failure, which is a result of the request and not a fault in the transport.
Fields
§
code: IrErrorCodeThe code the peer sent.
Trait Implementations§
Source§impl Clone for RequestError
impl Clone for RequestError
Source§impl Debug for RequestError
impl Debug for RequestError
Source§impl Display for RequestError
impl Display for RequestError
impl Eq for RequestError
Source§impl Error for RequestError
impl Error for RequestError
1.30.0 · 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<RequestError> for StdioClientError
impl From<RequestError> for StdioClientError
Source§fn from(source: RequestError) -> Self
fn from(source: RequestError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RequestError
impl PartialEq for RequestError
impl StructuralPartialEq for RequestError
Auto Trait Implementations§
impl Freeze for RequestError
impl RefUnwindSafe for RequestError
impl Send for RequestError
impl Sync for RequestError
impl Unpin for RequestError
impl UnsafeUnpin for RequestError
impl UnwindSafe for RequestError
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