Struct bitcoin_rest::Context[][src]

pub struct Context { /* fields omitted */ }

bitcoin_rest context.

Implementations

impl Context[src]

pub async fn call_json<T: for<'de> Deserialize<'de>>(
    &self,
    path: &str
) -> Result<T, Error>
[src]

Call the REST endpoint and parse it as a JSON.

pub async fn call_bin(&self, path: &str) -> Result<Bytes, Error>[src]

Call the REST endpoint (binary).

pub async fn call_hex(&self, path: &str) -> Result<String, Error>[src]

Call the REST endpoint (hex).

pub async fn tx(&self, txhash: &Txid) -> Result<Transaction, Error>[src]

Call the /tx endpoint.

pub async fn block(&self, blockhash: &BlockHash) -> Result<Block, Error>[src]

Call the /block endpoint.

pub async fn block_notxdetails(
    &self,
    blockhash: &BlockHash
) -> Result<BlockHeader, Error>
[src]

Call the /block/notxdetails endpoint.

pub async fn headers(
    &self,
    count: u32,
    blockhash: &BlockHash
) -> Result<Vec<BlockHeader>, Error>
[src]

Call the /headers endpoint.

pub async fn blockhashbyheight(&self, height: u32) -> Result<BlockHash, Error>[src]

Call the /blockhashbyheight endpoint.

pub async fn chaininfo(&self) -> Result<ChainInfo, Error>[src]

Call the /chaininfo endpoint.

pub async fn getutxos(
    &self,
    checkmempool: bool,
    txids: &[Txid]
) -> Result<UtxoData, Error>
[src]

Call the /getutxos endpoint.

Trait Implementations

impl Clone for Context[src]

impl Debug for Context[src]

Auto Trait Implementations

impl !RefUnwindSafe for Context

impl Send for Context

impl Sync for Context

impl Unpin for Context

impl !UnwindSafe for Context

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.