Struct diem_client::stream::response::StreamJsonRpcResponse
pub struct StreamJsonRpcResponse {
pub jsonrpc: JsonRpcVersion,
pub id: Option<Id>,
pub result: Option<Value>,
pub error: Option<JsonRpcError>,
}
Fields§
§jsonrpc: JsonRpcVersion
§id: Option<Id>
§result: Option<Value>
§error: Option<JsonRpcError>
Implementations§
§impl StreamJsonRpcResponse
impl StreamJsonRpcResponse
pub fn parse_result( &self, method: &StreamMethod ) -> Result<Option<StreamJsonRpcResponseView>, Error>
pub fn result(id: Option<Id>, result: Option<Value>) -> StreamJsonRpcResponse
pub fn error(id: Option<Id>, error: JsonRpcError) -> StreamJsonRpcResponse
Trait Implementations§
§impl Clone for StreamJsonRpcResponse
impl Clone for StreamJsonRpcResponse
§fn clone(&self) -> StreamJsonRpcResponse
fn clone(&self) -> StreamJsonRpcResponse
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 more§impl Debug for StreamJsonRpcResponse
impl Debug for StreamJsonRpcResponse
§impl<'de> Deserialize<'de> for StreamJsonRpcResponse
impl<'de> Deserialize<'de> for StreamJsonRpcResponse
§fn deserialize<__D>(
__deserializer: __D
) -> Result<StreamJsonRpcResponse, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<StreamJsonRpcResponse, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl FromStr for StreamJsonRpcResponse
impl FromStr for StreamJsonRpcResponse
§impl Serialize for StreamJsonRpcResponse
impl Serialize for StreamJsonRpcResponse
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for StreamJsonRpcResponse
impl Send for StreamJsonRpcResponse
impl Sync for StreamJsonRpcResponse
impl Unpin for StreamJsonRpcResponse
impl UnwindSafe for StreamJsonRpcResponse
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.