pub enum ObservedResponse {
Result {
result: Value,
},
Error {
error: ObservedError,
},
Transport {
status: u16,
body: String,
},
}Expand description
What the runner actually saw on the wire, in
the same shape the fixture uses for
expected.
A runner that recorded a 200 but a wrong body
would still produce a Fail; a runner that
recorded a 500 would surface the
transport-level error here.
Variants§
Result
The server answered with a result.
Error
The server answered with an error envelope.
Fields
§
error: ObservedErrorThe error code and message the server returned.
Transport
The transport returned a non-2xx status with a body the JSON-RPC layer could not parse, or returned no body at all.
Trait Implementations§
Source§impl Clone for ObservedResponse
impl Clone for ObservedResponse
Source§impl Debug for ObservedResponse
impl Debug for ObservedResponse
Source§impl<'de> Deserialize<'de> for ObservedResponse
impl<'de> Deserialize<'de> for ObservedResponse
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
Source§impl Display for ObservedResponse
impl Display for ObservedResponse
impl Eq for ObservedResponse
Source§impl PartialEq for ObservedResponse
impl PartialEq for ObservedResponse
Source§impl Serialize for ObservedResponse
impl Serialize for ObservedResponse
impl StructuralPartialEq for ObservedResponse
Auto Trait Implementations§
impl Freeze for ObservedResponse
impl RefUnwindSafe for ObservedResponse
impl Send for ObservedResponse
impl Sync for ObservedResponse
impl Unpin for ObservedResponse
impl UnsafeUnpin for ObservedResponse
impl UnwindSafe for ObservedResponse
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