pub struct IndexDatabase<'a> { /* private fields */ }
Implementations§
Source§impl<'a> IndexDatabase<'a>
impl<'a> IndexDatabase<'a>
pub fn from_db( db: &'a DB, cf: &'a ColumnFamily, network: NetworkType, genesis_header: HeaderView, enable_explorer: bool, ) -> Result<IndexDatabase<'a>, IndexError>
pub fn apply_next_block(&mut self, block: BlockView) -> Result<(), IndexError>
pub fn update_tip(&mut self, header: HeaderView)
pub fn tip_header(&self) -> &HeaderView
pub fn last_header(&self) -> Option<&HeaderView>
pub fn last_number(&self) -> Option<u64>
pub fn next_number(&self) -> Option<u64>
pub fn get_capacity(&self, lock_hash: Byte32) -> Option<u64>
pub fn get_lock_script_by_hash(&self, lock_hash: Byte32) -> Option<Script>
pub fn get_live_cells_by_lock<F: FnMut(usize, &LiveCellInfo) -> (bool, bool)>( &self, lock_hash: Byte32, from_number: Option<u64>, terminator: F, ) -> Vec<LiveCellInfo>
pub fn get_live_cells_by_type<F: FnMut(usize, &LiveCellInfo) -> (bool, bool)>( &self, type_hash: Byte32, from_number: Option<u64>, terminator: F, ) -> Vec<LiveCellInfo>
pub fn get_live_cells_by_code<F: FnMut(usize, &LiveCellInfo) -> (bool, bool)>( &self, code_hash: Byte32, from_number: Option<u64>, terminator: F, ) -> Vec<LiveCellInfo>
pub fn get_live_cell_infos<F: FnMut(usize, &LiveCellInfo) -> (bool, bool)>( &self, key_prefix: Key, key_start: Key, terminator: F, ) -> Vec<LiveCellInfo>
pub fn get_top_n(&self, n: usize) -> Vec<(Byte32, Option<AddressPayload>, u64)>
pub fn get_metrics( &self, key_type_opt: Option<KeyType>, ) -> BTreeMap<KeyType, KeyMetrics>
Auto Trait Implementations§
impl<'a> !Freeze for IndexDatabase<'a>
impl<'a> RefUnwindSafe for IndexDatabase<'a>
impl<'a> !Send for IndexDatabase<'a>
impl<'a> !Sync for IndexDatabase<'a>
impl<'a> Unpin for IndexDatabase<'a>
impl<'a> UnwindSafe for IndexDatabase<'a>
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