pub struct BlockchainExplorer<'a> { /* private fields */ }Expand description
Implementations§
Source§impl<'a> BlockchainExplorer<'a>
impl<'a> BlockchainExplorer<'a>
Sourcepub fn new(snapshot: &'a dyn Snapshot) -> Self
pub fn new(snapshot: &'a dyn Snapshot) -> Self
Creates a new BlockchainExplorer instance from the provided snapshot.
Sourcepub fn from_schema(schema: Schema<&'a dyn Snapshot>) -> Self
pub fn from_schema(schema: Schema<&'a dyn Snapshot>) -> Self
Creates a new BlockchainExplorer instance from the core schema.
Sourcepub fn transaction(&self, tx_hash: &Hash) -> Option<TransactionInfo>
pub fn transaction(&self, tx_hash: &Hash) -> Option<TransactionInfo>
Returns information about the transaction identified by the hash.
Sourcepub fn call_status(
&self,
block_height: Height,
call_location: CallInBlock,
) -> Result<(), ExecutionError>
pub fn call_status( &self, block_height: Height, call_location: CallInBlock, ) -> Result<(), ExecutionError>
Returns the status of a call in a block.
§Return value
This method will return Ok(()) both if the call completed successfully, or if
was not performed at all. The caller is responsible to distinguish these two outcomes.
Sourcepub fn transaction_without_proof(
&self,
tx_hash: &Hash,
) -> Option<Verified<AnyTx>>
pub fn transaction_without_proof( &self, tx_hash: &Hash, ) -> Option<Verified<AnyTx>>
Return transaction message without proof.
Sourcepub fn block(&self, height: Height) -> Option<BlockInfo<'_>>
pub fn block(&self, height: Height) -> Option<BlockInfo<'_>>
Returns block information for the specified height or None if there is no such block.
Sourcepub fn block_with_txs(&self, height: Height) -> Option<BlockWithTransactions>
pub fn block_with_txs(&self, height: Height) -> Option<BlockWithTransactions>
Return a block together with its transactions at the specified height, or None
if there is no such block.
Trait Implementations§
Source§impl<'a> Clone for BlockchainExplorer<'a>
impl<'a> Clone for BlockchainExplorer<'a>
Source§fn clone(&self) -> BlockchainExplorer<'a>
fn clone(&self) -> BlockchainExplorer<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for BlockchainExplorer<'a>
impl<'a> Debug for BlockchainExplorer<'a>
impl<'a> Copy for BlockchainExplorer<'a>
Auto Trait Implementations§
impl<'a> Freeze for BlockchainExplorer<'a>
impl<'a> !RefUnwindSafe for BlockchainExplorer<'a>
impl<'a> Send for BlockchainExplorer<'a>
impl<'a> Sync for BlockchainExplorer<'a>
impl<'a> Unpin for BlockchainExplorer<'a>
impl<'a> !UnwindSafe for BlockchainExplorer<'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