Enum bdk::blockchain::any::AnyBlockchain
source · [−]pub enum AnyBlockchain {
Electrum(ElectrumBlockchain),
Esplora(EsploraBlockchain),
CompactFilters(CompactFiltersBlockchain),
Rpc(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(ElectrumBlockchain)
electrum
only.Electrum client
Esplora(EsploraBlockchain)
esplora
only.Esplora client
CompactFilters(CompactFiltersBlockchain)
compact_filters
only.Compact filters client
Rpc(RpcBlockchain)
rpc
only.RPC client
Trait Implementations
sourceimpl Blockchain for AnyBlockchain
impl Blockchain for AnyBlockchain
sourcefn get_capabilities(&self) -> HashSet<Capability>
fn get_capabilities(&self) -> HashSet<Capability>
Return the set of Capability
supported by this backend
sourceimpl ConfigurableBlockchain for AnyBlockchain
impl ConfigurableBlockchain for AnyBlockchain
type Config = AnyBlockchainConfig
type Config = AnyBlockchainConfig
Type that contains the configuration
sourcefn from_config(config: &Self::Config) -> Result<Self, Error>
fn from_config(config: &Self::Config) -> Result<Self, Error>
Create a new instance given a configuration
sourceimpl From<CompactFiltersBlockchain> for AnyBlockchain
impl From<CompactFiltersBlockchain> for AnyBlockchain
sourcefn from(inner: CompactFiltersBlockchain) -> Self
fn from(inner: CompactFiltersBlockchain) -> Self
Converts to this type from the input type.
sourceimpl From<ElectrumBlockchain> for AnyBlockchain
impl From<ElectrumBlockchain> for AnyBlockchain
sourcefn from(inner: ElectrumBlockchain) -> Self
fn from(inner: ElectrumBlockchain) -> Self
Converts to this type from the input type.
sourceimpl From<EsploraBlockchain> for AnyBlockchain
impl From<EsploraBlockchain> for AnyBlockchain
sourcefn from(inner: EsploraBlockchain) -> Self
fn from(inner: EsploraBlockchain) -> Self
Converts to this type from the input type.
sourceimpl From<RpcBlockchain> for AnyBlockchain
impl From<RpcBlockchain> for AnyBlockchain
sourcefn from(inner: RpcBlockchain) -> Self
fn from(inner: RpcBlockchain) -> Self
Converts to this type from the input type.
sourceimpl GetHeight for AnyBlockchain
impl GetHeight for AnyBlockchain
sourcefn get_height(&self) -> Result<u32, Error>
fn get_height(&self) -> Result<u32, Error>
Return the current height
sourceimpl GetTx for AnyBlockchain
impl GetTx for AnyBlockchain
sourceimpl WalletSync for AnyBlockchain
impl WalletSync for AnyBlockchain
sourcefn wallet_sync<D: BatchDatabase>(
&self,
database: &mut D,
progress_update: Box<dyn Progress>
) -> Result<(), Error>
fn wallet_sync<D: BatchDatabase>(
&self,
database: &mut D,
progress_update: Box<dyn Progress>
) -> Result<(), Error>
If not overridden, it defaults to calling Self::wallet_setup
internally. Read more
sourcefn wallet_setup<D: BatchDatabase>(
&self,
database: &mut D,
progress_update: Box<dyn Progress>
) -> Result<(), Error>
fn wallet_setup<D: BatchDatabase>(
&self,
database: &mut D,
progress_update: Box<dyn Progress>
) -> Result<(), Error>
Setup the backend and populate the internal database for the first time Read more
Auto Trait Implementations
impl !RefUnwindSafe for AnyBlockchain
impl Send for AnyBlockchain
impl Sync for AnyBlockchain
impl Unpin for AnyBlockchain
impl !UnwindSafe for AnyBlockchain
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more