[−][src]Struct exonum_explorer::BlockInfo
Information about a block in the blockchain.
JSON presentation
JSON object with the following fields:
Name | Equivalent type | Description |
---|---|---|
block | Block | Block header as recorded in the blockchain |
precommits | Vec< Precommit > | Precommits authorizing the block |
txs | Vec< Hash > | Hashes of transactions in the block |
Methods
impl<'a> BlockInfo<'a>
[src]
pub fn header(&self) -> &Block
[src]
Returns block header as recorded in the blockchain.
pub fn into_header(self) -> Block
[src]
Extracts the header discarding all other information.
pub fn height(&self) -> Height
[src]
Returns the height of this block.
This method is equivalent to calling block.header().height()
.
pub fn len(&self) -> usize
[src]
Returns the number of transactions in this block.
pub fn is_empty(&self) -> bool
[src]
Is this block empty (i.e., contains no transactions)?
pub fn precommits(&self) -> Ref<[Verified<Precommit>]>
[src]
Returns a list of precommits for this block.
pub fn transaction_hashes(&self) -> Ref<[Hash]>
[src]
Lists hashes of transactions included in this block.
pub fn transaction(&self, index: usize) -> Option<CommittedTransaction>
[src]
Returns a transaction with the specified index in the block.
pub fn call_proof(&self, call_location: CallInBlock) -> CallProof
[src]
Returns the proof for the execution status of a call within this block.
Note that if the call did not result in an error or did not happen at all, the returned proof will not contain entries. To distinguish between two cases, one can inspect the number of transactions in the block or IDs of the active services when the block was executed.
pub fn iter(&self) -> Transactions
[src]
Iterates over transactions in the block.
pub fn with_transactions(self) -> BlockWithTransactions
[src]
Loads transactions, errors and precommits for the block.
Trait Implementations
impl<'a> Debug for BlockInfo<'a>
[src]
impl<'_> From<BlockInfo<'_>> for BlockInfo
[src]
impl<'a, 'r: 'a> IntoIterator for &'r BlockInfo<'a>
[src]
type Item = CommittedTransaction
The type of the elements being iterated over.
type IntoIter = Transactions<'a, 'r>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Transactions<'a, 'r>
[src]
impl<'a> Serialize for BlockInfo<'a>
[src]
Auto Trait Implementations
impl<'a> !RefUnwindSafe for BlockInfo<'a>
impl<'a> Send for BlockInfo<'a>
impl<'a> !Sync for BlockInfo<'a>
impl<'a> Unpin for BlockInfo<'a>
impl<'a> !UnwindSafe for BlockInfo<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,