logo
pub enum AnyBlockchain {
    Electrum(Box<ElectrumBlockchain>),
    Esplora(Box<EsploraBlockchain>),
    CompactFilters(Box<CompactFiltersBlockchain>),
    Rpc(Box<RpcBlockchain>),
}
Expand description

Type that can contain any of the Blockchain types defined by the library

It allows switching backend at runtime

See this module’s documentation for a usage example.

Variants

Electrum(Box<ElectrumBlockchain>)

Available on crate feature electrum only.

Electrum client

Esplora(Box<EsploraBlockchain>)

Available on crate feature esplora only.

Esplora client

CompactFilters(Box<CompactFiltersBlockchain>)

Available on crate feature compact_filters only.

Compact filters client

Rpc(Box<RpcBlockchain>)

Available on crate feature rpc only.

RPC client

Trait Implementations

Return the set of Capability supported by this backend

Broadcast a transaction

Estimate the fee rate required to confirm a transaction in a given target of blocks

Type that contains the configuration

Create a new instance given a configuration

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

fetch block hash given its height

Return the current height

Fetch a transaction given its txid

If not overridden, it defaults to calling Self::wallet_setup internally. Read more

Setup the backend and populate the internal database for the first time 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

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.