Struct lightning_block_sync::http::JsonResponse
source · pub struct JsonResponse(pub Value);
Available on crate features
rest-client
or rpc-client
only.Expand description
An HTTP response body in JSON format.
Tuple Fields§
§0: Value
Trait Implementations§
source§impl TryFrom<Vec<u8, Global>> for JsonResponse
impl TryFrom<Vec<u8, Global>> for JsonResponse
Interprets bytes from an HTTP response body as a JSON value.
source§impl TryInto<(BlockHash, Option<u32>)> for JsonResponse
impl TryInto<(BlockHash, Option<u32>)> for JsonResponse
Converts a JSON value into the best block hash and optional height.
source§impl TryInto<Block> for JsonResponse
impl TryInto<Block> for JsonResponse
Converts a JSON value into a block. Assumes the block is hex-encoded in a JSON string.
source§impl TryInto<BlockHeaderData> for JsonResponse
impl TryInto<BlockHeaderData> for JsonResponse
Converts a JSON value into block header data. The JSON value may be an object representing a block header or an array of such objects. In the latter case, the first object is converted.
source§impl TryInto<Transaction> for JsonResponse
impl TryInto<Transaction> for JsonResponse
Converts a JSON value into a transaction. WATCH OUT! this cannot be used for zero-input transactions (e.g. createrawtransaction). See https://github.com/rust-bitcoin/rust-bitcoincore-rpc/issues/197