Struct diem_types::transaction::TransactionInfo
source · pub struct TransactionInfo { /* private fields */ }
Expand description
TransactionInfo
is the object we store in the transaction accumulator. It consists of the
transaction as well as the execution result of this transaction.
Implementations§
source§impl TransactionInfo
impl TransactionInfo
sourcepub fn new(
transaction_hash: HashValue,
state_root_hash: HashValue,
event_root_hash: HashValue,
gas_used: u64,
status: KeptVMStatus
) -> TransactionInfo
pub fn new( transaction_hash: HashValue, state_root_hash: HashValue, event_root_hash: HashValue, gas_used: u64, status: KeptVMStatus ) -> TransactionInfo
Constructs a new TransactionInfo
object using transaction hash, state root hash and event
root hash.
sourcepub fn transaction_hash(&self) -> HashValue
pub fn transaction_hash(&self) -> HashValue
Returns the hash of this transaction.
sourcepub fn state_root_hash(&self) -> HashValue
pub fn state_root_hash(&self) -> HashValue
Returns root hash of Sparse Merkle Tree describing the world state at the end of this transaction.
sourcepub fn event_root_hash(&self) -> HashValue
pub fn event_root_hash(&self) -> HashValue
Returns the root hash of Merkle Accumulator storing all events emitted during this transaction.
pub fn status(&self) -> &KeptVMStatus
Trait Implementations§
source§impl Arbitrary for TransactionInfo
impl Arbitrary for TransactionInfo
§type Parameters = (<HashValue as Arbitrary>::Parameters, <HashValue as Arbitrary>::Parameters, <HashValue as Arbitrary>::Parameters, <u64 as Arbitrary>::Parameters, <KeptVMStatus as Arbitrary>::Parameters)
type Parameters = (<HashValue as Arbitrary>::Parameters, <HashValue as Arbitrary>::Parameters, <HashValue as Arbitrary>::Parameters, <u64 as Arbitrary>::Parameters, <KeptVMStatus as Arbitrary>::Parameters)
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = Map<(<HashValue as Arbitrary>::Strategy, <HashValue as Arbitrary>::Strategy, <HashValue as Arbitrary>::Strategy, <u64 as Arbitrary>::Strategy, <KeptVMStatus as Arbitrary>::Strategy), fn(_: (HashValue, HashValue, HashValue, u64, KeptVMStatus)) -> TransactionInfo>
type Strategy = Map<(<HashValue as Arbitrary>::Strategy, <HashValue as Arbitrary>::Strategy, <HashValue as Arbitrary>::Strategy, <u64 as Arbitrary>::Strategy, <KeptVMStatus as Arbitrary>::Strategy), fn(_: (HashValue, HashValue, HashValue, u64, KeptVMStatus)) -> TransactionInfo>
The type of
Strategy
used to generate values of type Self
.source§fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
source§impl Clone for TransactionInfo
impl Clone for TransactionInfo
source§fn clone(&self) -> TransactionInfo
fn clone(&self) -> TransactionInfo
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 CryptoHash for TransactionInfo
impl CryptoHash for TransactionInfo
source§impl Debug for TransactionInfo
impl Debug for TransactionInfo
source§impl<'de> Deserialize<'de> for TransactionInfo
impl<'de> Deserialize<'de> for TransactionInfo
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for TransactionInfo
impl Display for TransactionInfo
source§impl PartialEq<TransactionInfo> for TransactionInfo
impl PartialEq<TransactionInfo> for TransactionInfo
source§fn eq(&self, other: &TransactionInfo) -> bool
fn eq(&self, other: &TransactionInfo) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for TransactionInfo
impl Serialize for TransactionInfo
impl Eq for TransactionInfo
impl StructuralEq for TransactionInfo
impl StructuralPartialEq for TransactionInfo
Auto Trait Implementations§
impl RefUnwindSafe for TransactionInfo
impl Send for TransactionInfo
impl Sync for TransactionInfo
impl Unpin for TransactionInfo
impl UnwindSafe for TransactionInfo
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
source§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.