pub struct DataLoaderWrapper<T>(/* private fields */);
Expand description
DataLoaderWrapper wrapChainStore
impl HeaderProvider
CellDataProvider
EpochProvider
Trait Implementations§
Source§impl<T> CellDataProvider for DataLoaderWrapper<T>where
T: ChainStore,
impl<T> CellDataProvider for DataLoaderWrapper<T>where
T: ChainStore,
Source§fn get_cell_data_hash(&self, out_point: &OutPoint) -> Option<Byte32>
fn get_cell_data_hash(&self, out_point: &OutPoint) -> Option<Byte32>
Fetch cell_data_hash from storage, please note that loading a large amount of cell data
and calculating hash may be a performance bottleneck, so here is a separate fn designed
to facilitate caching. Read more
Source§impl<T> Clone for DataLoaderWrapper<T>
impl<T> Clone for DataLoaderWrapper<T>
Source§impl<T> EpochProvider for DataLoaderWrapper<T>where
T: ChainStore,
impl<T> EpochProvider for DataLoaderWrapper<T>where
T: ChainStore,
Source§fn get_epoch_ext(&self, header: &HeaderView) -> Option<EpochExt>
fn get_epoch_ext(&self, header: &HeaderView) -> Option<EpochExt>
Get corresponding
EpochExt
by block headerSource§fn get_block_hash(&self, number: BlockNumber) -> Option<Byte32>
fn get_block_hash(&self, number: BlockNumber) -> Option<Byte32>
Get block header hash by block number
Source§fn get_block_ext(&self, block_hash: &Byte32) -> Option<BlockExt>
fn get_block_ext(&self, block_hash: &Byte32) -> Option<BlockExt>
Get block ext by block header hash
Source§fn get_block_header(&self, hash: &Byte32) -> Option<HeaderView>
fn get_block_header(&self, hash: &Byte32) -> Option<HeaderView>
Get header by block header hash
Source§fn get_block_epoch(&self, header: &HeaderView) -> Option<BlockEpoch>
fn get_block_epoch(&self, header: &HeaderView) -> Option<BlockEpoch>
Get corresponding epoch progress information by block header
Source§impl<T> ExtensionProvider for DataLoaderWrapper<T>where
T: ChainStore,
impl<T> ExtensionProvider for DataLoaderWrapper<T>where
T: ChainStore,
Source§impl<T> HeaderFieldsProvider for DataLoaderWrapper<T>where
T: ChainStore,
impl<T> HeaderFieldsProvider for DataLoaderWrapper<T>where
T: ChainStore,
Source§fn get_header_fields(&self, hash: &Byte32) -> Option<HeaderFields>
fn get_header_fields(&self, hash: &Byte32) -> Option<HeaderFields>
Get the header fields of the given block hash
Source§impl<T> HeaderProvider for DataLoaderWrapper<T>where
T: ChainStore,
impl<T> HeaderProvider for DataLoaderWrapper<T>where
T: ChainStore,
Source§fn get_header(&self, block_hash: &Byte32) -> Option<HeaderView>
fn get_header(&self, block_hash: &Byte32) -> Option<HeaderView>
Get the header of the given block hash
Auto Trait Implementations§
impl<T> Freeze for DataLoaderWrapper<T>
impl<T> RefUnwindSafe for DataLoaderWrapper<T>where
T: RefUnwindSafe,
impl<T> Send for DataLoaderWrapper<T>
impl<T> Sync for DataLoaderWrapper<T>
impl<T> Unpin for DataLoaderWrapper<T>
impl<T> UnwindSafe for DataLoaderWrapper<T>where
T: RefUnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more