Struct diem_sdk::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
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
pub fn clone(&self) -> StreamJsonRpcResponse
pub fn clone(&self) -> StreamJsonRpcResponse
Returns a copy of the value. Read more
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
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<StreamJsonRpcResponse, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub 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
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub 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
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Generates a hash used only for tests.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more