Struct bdk_chain::spk_client::FullScanRequest

source ·
pub struct FullScanRequest<K> { /* private fields */ }
Expand description

Data required to perform a spk-based blockchain client full scan.

A client full scan iterates through all the scripts for the given keychains, fetching relevant data until some stop gap number of scripts is found that have no data. This operation is generally only used when importing or restoring previously used keychains in which the list of used scripts is not known. The full scan process also updates the chain from the given chain_tip (if provided).

Implementations§

source§

impl<K> FullScanRequest<K>
where K: Ord + Clone,

source

pub fn builder() -> FullScanRequestBuilder<K>

Start building a FullScanRequest.

source

pub fn chain_tip(&self) -> Option<CheckPoint>

Get the chain tip CheckPoint of this request (if any).

source

pub fn keychains(&self) -> Vec<K>

List all keychains contained in this request.

source

pub fn next_spk(&mut self, keychain: K) -> Option<(u32, ScriptBuf)>

Advances the full scan request and returns the next indexed ScriptBuf of the given keychain.

source

pub fn iter_spks( &mut self, keychain: K ) -> impl Iterator<Item = (u32, ScriptBuf)>

Iterate over indexed ScriptBufs contained in this request of the given keychain.

Trait Implementations§

source§

impl<K> Default for FullScanRequest<K>

source§

fn default() -> FullScanRequest<K>

Returns the “default value” for a type. Read more
source§

impl<K> From<FullScanRequestBuilder<K>> for FullScanRequest<K>

source§

fn from(builder: FullScanRequestBuilder<K>) -> FullScanRequest<K>

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<K> Freeze for FullScanRequest<K>

§

impl<K> !RefUnwindSafe for FullScanRequest<K>

§

impl<K> Send for FullScanRequest<K>
where K: Send,

§

impl<K> !Sync for FullScanRequest<K>

§

impl<K> Unpin for FullScanRequest<K>

§

impl<K> !UnwindSafe for FullScanRequest<K>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V