Struct ckb_store::data_loader_wrapper::DataLoaderWrapper[][src]

pub struct DataLoaderWrapper<'a, T>(_);
Expand description

TODO(doc): @quake

Implementations

impl<'a, T: ChainStore<'a>> DataLoaderWrapper<'a, T>[src]

pub fn new(source: &'a T) -> Self[src]

TODO(doc): @quake

Trait Implementations

impl<'a, T: ChainStore<'a>> CellDataProvider for DataLoaderWrapper<'a, T>[src]

fn get_cell_data(&self, out_point: &OutPoint) -> Option<Bytes>[src]

fetch cell_data from storage

fn get_cell_data_hash(&self, out_point: &OutPoint) -> Option<Byte32>[src]

fetch cell_data_hash from storage

fn load_cell_data(&self, cell: &CellMeta) -> Option<Bytes>[src]

load cell_data from memory, fallback to storage access

fn load_cell_data_hash(&self, cell: &CellMeta) -> Option<Byte32>[src]

load cell_data_hash from memory, fallback to storage access

impl<'a, T: ChainStore<'a>> EpochProvider for DataLoaderWrapper<'a, T>[src]

fn get_epoch_ext(&self, header: &HeaderView) -> Option<EpochExt>[src]

Gets corresponding EpochExt by block header

fn get_block_epoch(&self, header: &HeaderView) -> Option<BlockEpoch>[src]

Gets corresponding epoch progress information by block header

impl<'a, T: ChainStore<'a>> HeaderProvider for DataLoaderWrapper<'a, T>[src]

fn get_header(&self, block_hash: &Byte32) -> Option<HeaderView>[src]

TODO(doc): @quake

fn timestamp_and_parent(&self, block_hash: &Byte32) -> (u64, u64, Byte32)[src]

Return timestamp and block_number of the corresponding block_hash, and hash of parent block

fn block_median_time(
    &self,
    block_hash: &Byte32,
    median_block_count: usize
) -> u64
[src]

Return past block median time, including the timestamp of the given one

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for DataLoaderWrapper<'a, T> where
    T: RefUnwindSafe

impl<'a, T> Send for DataLoaderWrapper<'a, T> where
    T: Sync

impl<'a, T> Sync for DataLoaderWrapper<'a, T> where
    T: Sync

impl<'a, T> Unpin for DataLoaderWrapper<'a, T>

impl<'a, T> UnwindSafe for DataLoaderWrapper<'a, T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> AsAny for T where
    T: Any

pub fn as_any(&self) -> &(dyn Any + 'static)

TODO(doc): @quake

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

pub fn vzip(self) -> V