Skip to main content

BalProvider

Trait BalProvider 

Source
pub trait BalProvider {
    // Required method
    fn bal_store(&self) -> &BalStoreHandle;

    // Provided methods
    fn get_bal_by_hash(
        &self,
        block_hash: BlockHash,
    ) -> ProviderResult<Option<Bytes>> { ... }
    fn get_bals_by_hashes(
        &self,
        block_hashes: &[BlockHash],
    ) -> ProviderResult<Vec<Option<Bytes>>> { ... }
    fn get_bals_by_hashes_with_limit(
        &self,
        block_hashes: &[BlockHash],
        limit: GetBlockAccessListLimit,
    ) -> ProviderResult<Vec<Option<Bytes>>> { ... }
}
Expand description

Provider-side access to BAL storage.

Required Methods§

Source

fn bal_store(&self) -> &BalStoreHandle

Returns the configured BAL store handle.

Provided Methods§

Source

fn get_bal_by_hash( &self, block_hash: BlockHash, ) -> ProviderResult<Option<Bytes>>

Fetches the BAL for the given block hash.

Source

fn get_bals_by_hashes( &self, block_hashes: &[BlockHash], ) -> ProviderResult<Vec<Option<Bytes>>>

Fetches BALs for the given block hashes.

Source

fn get_bals_by_hashes_with_limit( &self, block_hashes: &[BlockHash], limit: GetBlockAccessListLimit, ) -> ProviderResult<Vec<Option<Bytes>>>

Fetches BAL response entries for the given block hashes, stopping after the soft limit is exceeded.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, T: 'a + BalProvider + ?Sized> BalProvider for &'a T

Source§

fn bal_store(&self) -> &BalStoreHandle

Source§

fn get_bal_by_hash( &self, block_hash: BlockHash, ) -> ProviderResult<Option<Bytes>>

Source§

fn get_bals_by_hashes( &self, block_hashes: &[BlockHash], ) -> ProviderResult<Vec<Option<Bytes>>>

Source§

fn get_bals_by_hashes_with_limit( &self, block_hashes: &[BlockHash], limit: GetBlockAccessListLimit, ) -> ProviderResult<Vec<Option<Bytes>>>

Source§

impl<T: BalProvider + ?Sized> BalProvider for Arc<T>

Source§

fn bal_store(&self) -> &BalStoreHandle

Source§

fn get_bal_by_hash( &self, block_hash: BlockHash, ) -> ProviderResult<Option<Bytes>>

Source§

fn get_bals_by_hashes( &self, block_hashes: &[BlockHash], ) -> ProviderResult<Vec<Option<Bytes>>>

Source§

fn get_bals_by_hashes_with_limit( &self, block_hashes: &[BlockHash], limit: GetBlockAccessListLimit, ) -> ProviderResult<Vec<Option<Bytes>>>

Implementors§

Source§

impl<ChainSpec, N> BalProvider for NoopProvider<ChainSpec, N>