pub struct JrpcResponse { /* private fields */ }
Implementations§
Source§impl JrpcResponse
impl JrpcResponse
pub fn new( result: Option<JsonValue>, error: Option<JrpcError>, id: JsonValue, ) -> Result<Self, ErrorVariant>
pub fn from_jrpc_request( request: &JrpcRequest, response: JrpcResponseParam, ) -> Result<Self, ErrorVariant>
pub fn parse<F: ToString>(message: F) -> Result<Self, ErrorVariant>
pub fn validate(self) -> Result<Self, ErrorVariant>
pub fn get_jsonrpc(&self) -> &String
pub fn get_result(&self) -> &Option<JsonValue>
pub fn get_error(&self) -> &Option<JrpcError>
pub fn get_id(&self) -> &JsonValue
Trait Implementations§
Source§impl Clone for JrpcResponse
impl Clone for JrpcResponse
Source§fn clone(&self) -> JrpcResponse
fn clone(&self) -> JrpcResponse
Returns a duplicate 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 JrpcResponse
impl Debug for JrpcResponse
Source§impl<'de> Deserialize<'de> for JrpcResponse
impl<'de> Deserialize<'de> for JrpcResponse
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
Auto Trait Implementations§
impl Freeze for JrpcResponse
impl RefUnwindSafe for JrpcResponse
impl Send for JrpcResponse
impl Sync for JrpcResponse
impl Unpin for JrpcResponse
impl UnwindSafe for JrpcResponse
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