[−][src]Struct exonum_explorer::BlockWithTransactions
Information about a block in the blockchain with info on transactions eagerly loaded.
Fields (Non-exhaustive)
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.header: Block
Block header as recorded in the blockchain.
precommits: Vec<Verified<Precommit>>
Precommits.
transactions: Vec<CommittedTransaction>
Transactions in the order they appear in the block.
errors: Vec<ErrorWithLocation>
Errors that have occurred within the block.
Methods
impl BlockWithTransactions
[src]
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 iter(&self) -> EagerTransactions
[src]
Iterates over transactions in the block.
pub fn error_map(&self) -> BTreeMap<CallInBlock, &ExecutionError>
[src]
Returns errors converted into a map. Note that this is potentially a costly operation.
Trait Implementations
impl Debug for BlockWithTransactions
[src]
impl<'de> Deserialize<'de> for BlockWithTransactions
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Index<Hash> for BlockWithTransactions
[src]
Returns a transaction in the block by its hash. Beware that this is a slow operation (linear w.r.t. the number of transactions in a block).
type Output = CommittedTransaction
The returned type after indexing.
fn index(&self, index: Hash) -> &CommittedTransaction
[src]
impl Index<usize> for BlockWithTransactions
[src]
type Output = CommittedTransaction
The returned type after indexing.
fn index(&self, index: usize) -> &CommittedTransaction
[src]
impl<'a> IntoIterator for &'a BlockWithTransactions
[src]
type Item = &'a CommittedTransaction
The type of the elements being iterated over.
type IntoIter = EagerTransactions<'a>
Which kind of iterator are we turning this into?
fn into_iter(self) -> EagerTransactions<'a>
[src]
impl Serialize for BlockWithTransactions
[src]
Auto Trait Implementations
impl RefUnwindSafe for BlockWithTransactions
impl Send for BlockWithTransactions
impl Sync for BlockWithTransactions
impl Unpin for BlockWithTransactions
impl UnwindSafe for BlockWithTransactions
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> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
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>,