pub struct Response(/* private fields */);
Expand description
A JSON-RPC response.
Implementations§
Source§impl Response
impl Response
Sourcepub fn raw(&self) -> &RawResponse<'static>
pub fn raw(&self) -> &RawResponse<'static>
Hand back the raw response from the server.
Sourcepub fn ok_into<R: DeserializeOwned>(&self) -> Result<R, ResponseError>
pub fn ok_into<R: DeserializeOwned>(&self) -> Result<R, ResponseError>
Deserialize an “ok” response to the requested type.
Sourcepub fn error_into<Data: DeserializeOwned>(
&self,
) -> Result<ErrorObject<Data>, ResponseError>
pub fn error_into<Data: DeserializeOwned>( &self, ) -> Result<ErrorObject<Data>, ResponseError>
Deserialize an “error” response to the requested type.
Trait Implementations§
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