Struct diem_sdk::types::transaction::TransactionInfo
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§
§impl TransactionInfo
impl TransactionInfo
pub 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.
pub fn transaction_hash(&self) -> HashValue
pub fn transaction_hash(&self) -> HashValue
Returns the hash of this transaction.
pub 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.
pub 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§
§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
.§fn arbitrary_with(
_top: <TransactionInfo as Arbitrary>::Parameters
) -> <TransactionInfo as Arbitrary>::Strategy
fn arbitrary_with( _top: <TransactionInfo as Arbitrary>::Parameters ) -> <TransactionInfo as Arbitrary>::Strategy
§impl Clone for TransactionInfo
impl Clone for TransactionInfo
§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 more§impl CryptoHash for TransactionInfo
impl CryptoHash for TransactionInfo
§impl Debug for TransactionInfo
impl Debug for TransactionInfo
§impl<'de> Deserialize<'de> for TransactionInfo
impl<'de> Deserialize<'de> for TransactionInfo
§fn deserialize<__D>(
__deserializer: __D
) -> Result<TransactionInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<TransactionInfo, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Display for TransactionInfo
impl Display for TransactionInfo
§impl PartialEq<TransactionInfo> for TransactionInfo
impl PartialEq<TransactionInfo> for TransactionInfo
§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 ==
.§impl Serialize for TransactionInfo
impl Serialize for TransactionInfo
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.