Struct ckb_cli_plugin_protocol::JsonrpcResponse
source · pub struct JsonrpcResponse {
pub jsonrpc: String,
pub id: Value,
pub result: Option<Value>,
pub error: Option<JsonrpcError>,
}Expand description
A JSONRPC response object
Fields
jsonrpc: Stringjsonrpc field, MUST be “2.0”
id: ValueIdentifier for this Request, which should match that of the request
result: Option<Value>A result if there is one, or null
error: Option<JsonrpcError>An error if there is one, or null
Trait Implementations
sourceimpl Clone for JsonrpcResponse
impl Clone for JsonrpcResponse
sourcefn clone(&self) -> JsonrpcResponse
fn clone(&self) -> JsonrpcResponse
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for JsonrpcResponse
impl Debug for JsonrpcResponse
sourceimpl<'de> Deserialize<'de> for JsonrpcResponse
impl<'de> Deserialize<'de> for JsonrpcResponse
sourcefn 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
sourceimpl From<(u64, PluginResponse)> for JsonrpcResponse
impl From<(u64, PluginResponse)> for JsonrpcResponse
sourcefn from((id, response): (u64, PluginResponse)) -> JsonrpcResponse
fn from((id, response): (u64, PluginResponse)) -> JsonrpcResponse
Converts to this type from the input type.
sourceimpl Serialize for JsonrpcResponse
impl Serialize for JsonrpcResponse
sourceimpl TryFrom<JsonrpcResponse> for (u64, PluginResponse)
impl TryFrom<JsonrpcResponse> for (u64, PluginResponse)
sourcefn try_from(data: JsonrpcResponse) -> Result<(u64, PluginResponse), Self::Error>
fn try_from(data: JsonrpcResponse) -> Result<(u64, PluginResponse), Self::Error>
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for JsonrpcResponse
impl Send for JsonrpcResponse
impl Sync for JsonrpcResponse
impl Unpin for JsonrpcResponse
impl UnwindSafe for JsonrpcResponse
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more