pub enum ExpectedResponse {
Result {
result: Value,
},
Error {
error: ExpectedError,
},
}Expand description
What the server is expected to answer. One of
Result (a successful response) or
Error (a JSON-RPC error with the code and a
substring the message must contain).
Variants§
Result
A successful response, carrying the JSON the
server is expected to return. Compared as
Value::eq so a server that produces an
equal but differently-ordered object is
still a pass.
Fields
Error
An error response. The runner accepts any message that contains the substring (case-sensitive) — see the module docs.
Fields
§
error: ExpectedErrorThe code and a substring the message
must contain. See ExpectedError.
Trait Implementations§
Source§impl Clone for ExpectedResponse
impl Clone for ExpectedResponse
Source§impl Debug for ExpectedResponse
impl Debug for ExpectedResponse
Source§impl<'de> Deserialize<'de> for ExpectedResponse
impl<'de> Deserialize<'de> for ExpectedResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ExpectedResponse
Source§impl PartialEq for ExpectedResponse
impl PartialEq for ExpectedResponse
Source§impl Serialize for ExpectedResponse
impl Serialize for ExpectedResponse
impl StructuralPartialEq for ExpectedResponse
Auto Trait Implementations§
impl Freeze for ExpectedResponse
impl RefUnwindSafe for ExpectedResponse
impl Send for ExpectedResponse
impl Sync for ExpectedResponse
impl Unpin for ExpectedResponse
impl UnsafeUnpin for ExpectedResponse
impl UnwindSafe for ExpectedResponse
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