pub struct BorrowedDataLoaderWrapper<'a, T>(/* private fields */);
Expand description
Borrowed DataLoaderWrapper with lifetime
Implementations§
Source§impl<'a, T: ChainStore> BorrowedDataLoaderWrapper<'a, T>
impl<'a, T: ChainStore> BorrowedDataLoaderWrapper<'a, T>
Trait Implementations§
Source§impl<'a, T: ChainStore> CellDataProvider for BorrowedDataLoaderWrapper<'a, T>
impl<'a, T: ChainStore> CellDataProvider for BorrowedDataLoaderWrapper<'a, T>
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<'a, T: ChainStore> EpochProvider for BorrowedDataLoaderWrapper<'a, T>
impl<'a, T: ChainStore> EpochProvider for BorrowedDataLoaderWrapper<'a, T>
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<'a, T: ChainStore> ExtensionProvider for BorrowedDataLoaderWrapper<'a, T>
impl<'a, T: ChainStore> ExtensionProvider for BorrowedDataLoaderWrapper<'a, T>
Source§impl<'a, T: ChainStore> HeaderProvider for BorrowedDataLoaderWrapper<'a, T>
impl<'a, T: ChainStore> HeaderProvider for BorrowedDataLoaderWrapper<'a, T>
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<'a, T> Freeze for BorrowedDataLoaderWrapper<'a, T>
impl<'a, T> RefUnwindSafe for BorrowedDataLoaderWrapper<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for BorrowedDataLoaderWrapper<'a, T>where
T: Sync,
impl<'a, T> Sync for BorrowedDataLoaderWrapper<'a, T>where
T: Sync,
impl<'a, T> Unpin for BorrowedDataLoaderWrapper<'a, T>
impl<'a, T> UnwindSafe for BorrowedDataLoaderWrapper<'a, 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> 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