#[non_exhaustive]pub struct AnyResolver { /* private fields */ }Expand description
Generic struct wrapping any implementation of the ResolveWitness trait.
It also contains a map of the Consignment TXs, non-empty if add_consignment_txes has been
called.
Implementations§
Source§impl AnyResolver
impl AnyResolver
Sourcepub fn electrum_blocking(
url: &str,
config: Option<Config>,
) -> Result<AnyResolver, String>
pub fn electrum_blocking( url: &str, config: Option<Config>, ) -> Result<AnyResolver, String>
Return an AnyResolver wrapping an super::electrum_blocking::ElectrumClient.
Sourcepub fn esplora_blocking(builder: Builder) -> Result<AnyResolver, String>
pub fn esplora_blocking(builder: Builder) -> Result<AnyResolver, String>
Return an AnyResolver wrapping an super::esplora_blocking::EsploraClient.
Sourcepub fn mempool_blocking(
_url: &str,
builder: Option<Builder>,
) -> Result<AnyResolver, String>
pub fn mempool_blocking( _url: &str, builder: Option<Builder>, ) -> Result<AnyResolver, String>
Return an AnyResolver wrapping a super::mempool_blocking::MemPoolClient.
Sourcepub fn add_consignment_txes<const TYPE: bool>(
&mut self,
consignment: &Consignment<TYPE>,
)
pub fn add_consignment_txes<const TYPE: bool>( &mut self, consignment: &Consignment<TYPE>, )
Add to the resolver the TXs found in the consignment bundles. Those TXs will not be resolved by an indexer and will be considered tentative. Use with caution, this could allow accepting a consignment containing TXs that have not been broadcasted.
Trait Implementations§
Source§impl ResolveWitness for AnyResolver
impl ResolveWitness for AnyResolver
Source§fn resolve_witness(
&self,
witness_id: Txid,
) -> Result<WitnessStatus, WitnessResolverError>
fn resolve_witness( &self, witness_id: Txid, ) -> Result<WitnessStatus, WitnessResolverError>
Provide the
WitnessStatus for a TX with the given witness_id.Source§fn check_chain_net(
&self,
chain_net: ChainNet,
) -> Result<(), WitnessResolverError>
fn check_chain_net( &self, chain_net: ChainNet, ) -> Result<(), WitnessResolverError>
Check that the resolver works with the expected
ChainNet.Auto Trait Implementations§
impl Freeze for AnyResolver
impl !RefUnwindSafe for AnyResolver
impl Send for AnyResolver
impl !Sync for AnyResolver
impl Unpin for AnyResolver
impl !UnwindSafe for AnyResolver
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