pub enum ResponseResult {
Result(Value),
Error(RequestError),
}
Expand description
The result-or-error part of JSON RPC response.
Variants§
Result(Value)
Error(RequestError)
Implementations§
Source§impl ResponseResult
impl ResponseResult
pub fn unwrap_result(self) -> Value
pub fn new_error(id: Id, error: RequestError) -> Response
Trait Implementations§
Source§impl Clone for ResponseResult
impl Clone for ResponseResult
Source§fn clone(&self) -> ResponseResult
fn clone(&self) -> ResponseResult
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ResponseResult
impl Debug for ResponseResult
Source§impl<RET: Deserialize, RET_ERROR: Deserialize> From<ResponseResult> for RequestResult<RET, RET_ERROR>
impl<RET: Deserialize, RET_ERROR: Deserialize> From<ResponseResult> for RequestResult<RET, RET_ERROR>
Source§fn from(response_result: ResponseResult) -> Self
fn from(response_result: ResponseResult) -> Self
Converts to this type from the input type.
Source§impl<RET, RET_ERROR> From<Result<RET, MethodError<RET_ERROR>>> for ResponseResult
impl<RET, RET_ERROR> From<Result<RET, MethodError<RET_ERROR>>> for ResponseResult
Source§fn from(method_result: MethodResult<RET, RET_ERROR>) -> Self
fn from(method_result: MethodResult<RET, RET_ERROR>) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ResponseResult
impl PartialEq for ResponseResult
impl StructuralPartialEq for ResponseResult
Auto Trait Implementations§
impl Freeze for ResponseResult
impl RefUnwindSafe for ResponseResult
impl Send for ResponseResult
impl Sync for ResponseResult
impl Unpin for ResponseResult
impl UnwindSafe for ResponseResult
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