Enum bdk::blockchain::any::AnyBlockchain
source · 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§
source§impl Blockchain for AnyBlockchain
impl Blockchain for AnyBlockchain
source§fn get_capabilities(&self) -> HashSet<Capability>
fn get_capabilities(&self) -> HashSet<Capability>
Return the set of
Capability
supported by this backendsource§impl ConfigurableBlockchain for AnyBlockchain
impl ConfigurableBlockchain for AnyBlockchain
§type Config = AnyBlockchainConfig
type Config = AnyBlockchainConfig
Type that contains the configuration
source§impl From<CompactFiltersBlockchain> for AnyBlockchain
impl From<CompactFiltersBlockchain> for AnyBlockchain
source§fn from(inner: CompactFiltersBlockchain) -> Self
fn from(inner: CompactFiltersBlockchain) -> Self
Converts to this type from the input type.
source§impl From<ElectrumBlockchain> for AnyBlockchain
impl From<ElectrumBlockchain> for AnyBlockchain
source§fn from(inner: ElectrumBlockchain) -> Self
fn from(inner: ElectrumBlockchain) -> Self
Converts to this type from the input type.
source§impl From<EsploraBlockchain> for AnyBlockchain
impl From<EsploraBlockchain> for AnyBlockchain
source§fn from(inner: EsploraBlockchain) -> Self
fn from(inner: EsploraBlockchain) -> Self
Converts to this type from the input type.
source§impl From<RpcBlockchain> for AnyBlockchain
impl From<RpcBlockchain> for AnyBlockchain
source§fn from(inner: RpcBlockchain) -> Self
fn from(inner: RpcBlockchain) -> Self
Converts to this type from the input type.
source§impl GetBlockHash for AnyBlockchain
impl GetBlockHash for AnyBlockchain
source§impl GetHeight for AnyBlockchain
impl GetHeight for AnyBlockchain
source§impl GetTx for AnyBlockchain
impl GetTx for AnyBlockchain
source§impl WalletSync for AnyBlockchain
impl WalletSync for AnyBlockchain
source§fn wallet_sync<D: BatchDatabase>(
&self,
database: &RefCell<D>,
progress_update: Box<dyn Progress>
) -> Result<(), Error>
fn wallet_sync<D: BatchDatabase>( &self, database: &RefCell<D>, progress_update: Box<dyn Progress> ) -> Result<(), Error>
If not overridden, it defaults to calling
Self::wallet_setup
internally. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for AnyBlockchain
impl Send for AnyBlockchain
impl Sync for AnyBlockchain
impl Unpin for AnyBlockchain
impl !UnwindSafe for AnyBlockchain
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more