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

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

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.