Enum ckb_jsonrpc_types::ResponseFormat
source · [−]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
Json(V)
Serializes V
as Json
Hex(P)
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,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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