pub trait Api:
Sized
+ Send
+ Sync
+ 'static {
// Required methods
fn getblockhash(&self, height: usize) -> Result<BlockHash, Error>;
fn getblockheader(
&self,
blockhash: BlockHash,
verbose: bool,
) -> Result<String, Error>;
fn getblock(
&self,
blockhash: BlockHash,
verbosity: u64,
) -> Result<String, Error>;
fn get_raw_transaction(
&self,
txid: Txid,
verbose: bool,
blockhash: Option<BlockHash>,
) -> Result<Value, Error>;
fn list_unspent(
&self,
minconf: Option<usize>,
maxconf: Option<usize>,
address: Option<Address>,
include_unsafe: Option<bool>,
query_options: Option<String>,
) -> Result<Vec<ListUnspentResultEntry>, Error>;
// Provided method
fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M> { ... }
}
Required Methods§
fn getblockhash(&self, height: usize) -> Result<BlockHash, Error>
fn getblockheader( &self, blockhash: BlockHash, verbose: bool, ) -> Result<String, Error>
fn getblock( &self, blockhash: BlockHash, verbosity: u64, ) -> Result<String, Error>
fn get_raw_transaction( &self, txid: Txid, verbose: bool, blockhash: Option<BlockHash>, ) -> Result<Value, Error>
fn list_unspent( &self, minconf: Option<usize>, maxconf: Option<usize>, address: Option<Address>, include_unsafe: Option<bool>, query_options: Option<String>, ) -> Result<Vec<ListUnspentResultEntry>, Error>
Provided Methods§
Sourcefn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M>
fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M>
Create an IoDelegate
, wiring rpc calls to the trait methods.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.