Struct diem_json_rpc_types::stream::response::StreamJsonRpcResponse
source · 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§
source§impl StreamJsonRpcResponse
impl StreamJsonRpcResponse
pub fn parse_result( &self, method: &StreamMethod ) -> Result<Option<StreamJsonRpcResponseView>, Error>
pub fn result(id: Option<Id>, result: Option<Value>) -> Self
pub fn error(id: Option<Id>, error: JsonRpcError) -> Self
Trait Implementations§
source§impl Clone for StreamJsonRpcResponse
impl Clone for StreamJsonRpcResponse
source§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 moresource§impl Debug for StreamJsonRpcResponse
impl Debug for StreamJsonRpcResponse
source§impl<'de> Deserialize<'de> for StreamJsonRpcResponse
impl<'de> Deserialize<'de> for StreamJsonRpcResponse
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 From<StreamJsonRpcResponse> for Value
impl From<StreamJsonRpcResponse> for Value
source§fn from(response: StreamJsonRpcResponse) -> Self
fn from(response: StreamJsonRpcResponse) -> Self
Converts to this type from the input type.
source§impl FromStr for StreamJsonRpcResponse
impl FromStr for StreamJsonRpcResponse
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§
§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.