pub struct Response {
pub outputs: BTreeMap<u64, Result<Value, Error>>,
}
Expand description
Special purpose structure for holding a group of responses. Allows for response lookup by id. Does not support non-number ids.
Fields§
§outputs: BTreeMap<u64, Result<Value, Error>>
Mapping from id to output of rpc call.
Implementations§
Source§impl Response
impl Response
Sourcepub fn from_json_response(
raw_jsonrpc_response: Value,
) -> Result<Self, InvalidResponse>
pub fn from_json_response( raw_jsonrpc_response: Value, ) -> Result<Self, InvalidResponse>
Deserialize response from a jsonrpc server.
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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