Enum ckb_jsonrpc_types::ResponseFormat [−][src]
pub enum ResponseFormat<V, P> { Json(V), Hex(P), }
Expand description
This is a wrapper for JSON serialization to select the format between Json and Hex.
Examples
ResponseFormat<BlockView, Block>
returns the block in its Json format or molecule serialized
Hex format.
Variants
Serializes V
as Json
Serializes P
as Hex.
P
is first serialized by molecule into binary.
The binary is then encoded as a 0x-prefixed hex string.
Trait Implementations
Auto Trait Implementations
impl<V, P> RefUnwindSafe for ResponseFormat<V, P> where
P: RefUnwindSafe,
V: RefUnwindSafe,
impl<V, P> Send for ResponseFormat<V, P> where
P: Send,
V: Send,
impl<V, P> Sync for ResponseFormat<V, P> where
P: Sync,
V: Sync,
impl<V, P> Unpin for ResponseFormat<V, P> where
P: Unpin,
V: Unpin,
impl<V, P> UnwindSafe for ResponseFormat<V, P> where
P: UnwindSafe,
V: UnwindSafe,