pub trait Queryable<C: RpcApi>: Sized {
    type Id;

    // Required method
    fn query(rpc: &C, id: &Self::Id) -> Result<Self>;
}
Expand description

A type that can be queried from Bitcoin Core.

Required Associated Types§

source

type Id

Type of the ID used to query the item.

Required Methods§

source

fn query(rpc: &C, id: &Self::Id) -> Result<Self>

Query the item using rpc and convert to Self.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<C: RpcApi> Queryable<C> for Option<GetTxOutResult>

§

type Id = OutPoint

source§

fn query(rpc: &C, id: &Self::Id) -> Result<Self>

source§

impl<C: RpcApi> Queryable<C> for Block

§

type Id = BlockHash

source§

fn query(rpc: &C, id: &Self::Id) -> Result<Self>

source§

impl<C: RpcApi> Queryable<C> for Transaction

§

type Id = Txid

source§

fn query(rpc: &C, id: &Self::Id) -> Result<Self>

Implementors§