Enum bdk::blockchain::any::AnyBlockchain [−][src]
pub enum AnyBlockchain { Electrum(ElectrumBlockchain), Esplora(EsploraBlockchain), CompactFilters(CompactFiltersBlockchain), }
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.Expand description
Electrum client
Esplora(EsploraBlockchain)
esplora
only.Expand description
Esplora client
CompactFilters(CompactFiltersBlockchain)
compact_filters
only.Expand description
Compact filters client
Trait Implementations
impl Blockchain for AnyBlockchain
[src]
impl Blockchain for AnyBlockchain
[src]fn get_capabilities(&self) -> HashSet<Capability>
[src]
fn get_capabilities(&self) -> HashSet<Capability>
[src]Return the set of Capability
supported by this backend
fn setup<D: BatchDatabase, P: 'static + Progress>(
&self,
stop_gap: Option<usize>,
database: &mut D,
progress_update: P
) -> Result<(), Error>
[src]
fn setup<D: BatchDatabase, P: 'static + Progress>(
&self,
stop_gap: Option<usize>,
database: &mut D,
progress_update: P
) -> Result<(), Error>
[src]Setup the backend and populate the internal database for the first time Read more
fn sync<D: BatchDatabase, P: 'static + Progress>(
&self,
stop_gap: Option<usize>,
database: &mut D,
progress_update: P
) -> Result<(), Error>
[src]
fn sync<D: BatchDatabase, P: 'static + Progress>(
&self,
stop_gap: Option<usize>,
database: &mut D,
progress_update: P
) -> Result<(), Error>
[src]Populate the internal database with transactions and UTXOs Read more
fn get_tx(&self, txid: &Txid) -> Result<Option<Transaction>, Error>
[src]
fn get_tx(&self, txid: &Txid) -> Result<Option<Transaction>, Error>
[src]Fetch a transaction from the blockchain given its txid
fn get_height(&self) -> Result<u32, Error>
[src]
fn get_height(&self) -> Result<u32, Error>
[src]Return the current height
impl ConfigurableBlockchain for AnyBlockchain
[src]
impl ConfigurableBlockchain for AnyBlockchain
[src]type Config = AnyBlockchainConfig
type Config = AnyBlockchainConfig
Type that contains the configuration
fn from_config(config: &Self::Config) -> Result<Self, Error>
[src]
fn from_config(config: &Self::Config) -> Result<Self, Error>
[src]Create a new instance given a configuration
impl From<CompactFiltersBlockchain> for AnyBlockchain
[src]
impl From<CompactFiltersBlockchain> for AnyBlockchain
[src]fn from(inner: CompactFiltersBlockchain) -> Self
[src]
fn from(inner: CompactFiltersBlockchain) -> Self
[src]Performs the conversion.
impl From<ElectrumBlockchain> for AnyBlockchain
[src]
impl From<ElectrumBlockchain> for AnyBlockchain
[src]fn from(inner: ElectrumBlockchain) -> Self
[src]
fn from(inner: ElectrumBlockchain) -> Self
[src]Performs the conversion.
impl From<EsploraBlockchain> for AnyBlockchain
[src]
impl From<EsploraBlockchain> for AnyBlockchain
[src]fn from(inner: EsploraBlockchain) -> Self
[src]
fn from(inner: EsploraBlockchain) -> Self
[src]Performs the conversion.
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
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,