pub struct RpcResponse { /* private fields */ }Expand description
JSON-RPC 2.0 outgoing response envelope.
Implementations§
Source§impl RpcResponse
Inherent implementation of RpcResponse.
impl RpcResponse
Inherent implementation of RpcResponse.
Source§impl RpcResponse
impl RpcResponse
pub fn get_jsonrpc(&self) -> &String
pub fn get_mut_jsonrpc(&mut self) -> &mut String
pub fn set_jsonrpc(&mut self, val: String) -> &mut Self
pub fn get_result(&self) -> Option<Value>
pub fn try_get_result(&self) -> Option<Value>
pub fn get_mut_result(&mut self) -> &mut Option<Value>
pub fn set_result(&mut self, val: Option<Value>) -> &mut Self
pub fn get_error(&self) -> Option<RpcError>
pub fn try_get_error(&self) -> Option<RpcError>
pub fn get_mut_error(&mut self) -> &mut Option<RpcError>
pub fn set_error(&mut self, val: Option<RpcError>) -> &mut Self
pub fn get_id(&self) -> &RpcId
pub fn get_mut_id(&mut self) -> &mut RpcId
pub fn set_id(&mut self, val: RpcId) -> &mut Self
Trait Implementations§
Source§impl Clone for RpcResponse
impl Clone for RpcResponse
Source§impl Debug for RpcResponse
impl Debug for RpcResponse
Source§impl<'de> Deserialize<'de> for RpcResponse
impl<'de> Deserialize<'de> for RpcResponse
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 PartialEq for RpcResponse
impl PartialEq for RpcResponse
Source§impl Serialize for RpcResponse
impl Serialize for RpcResponse
impl StructuralPartialEq for RpcResponse
Auto Trait Implementations§
impl Forget for RpcResponse
impl Freeze for RpcResponsewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
impl Move for RpcResponse
impl RefUnwindSafe for RpcResponse
impl Send for RpcResponse
impl Sync for RpcResponse
impl Unpin for RpcResponse
impl UnsafeUnpin for RpcResponsewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
impl UnwindSafe for RpcResponse
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
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