pub trait TransactionEffectsExt: Sealed {
// Required methods
fn new_from_execution_v1(
status: ExecutionStatus,
epoch: EpochId,
gas_cost_summary: GasCostSummary,
shared_objects: Vec<SharedInput>,
loaded_per_epoch_config_objects: BTreeSet<ObjectId>,
transaction_digest: TransactionDigest,
lamport_version: SequenceNumber,
changed_objects: BTreeMap<ObjectId, EffectsObjectChange>,
gas_object: Option<ObjectId>,
events_digest: Option<TransactionEventsDigest>,
dependencies: Vec<TransactionDigest>,
) -> Self;
fn new_empty_v1(transaction_digest: TransactionDigest) -> Self;
fn execution_digests(&self) -> ExecutionDigests;
fn all_changed_objects(&self) -> Vec<(ObjectRef, Owner, WriteKind)>;
fn all_removed_objects(&self) -> Vec<(ObjectRef, ObjectRemoveKind)>;
fn all_tombstones(&self) -> Vec<(ObjectId, SequenceNumber)>;
fn created_then_wrapped_objects(&self) -> Vec<(ObjectId, SequenceNumber)>;
fn mutated_excluding_gas(&self) -> Vec<(ObjectRef, Owner)>;
fn all_affected_objects(&self) -> Vec<ObjectRef>;
fn summary_for_debug(&self) -> TransactionEffectsDebugSummary;
// Provided method
fn estimate_size_upperbound_v1(
num_writes: usize,
num_modifies: usize,
num_deps: usize,
) -> usize { ... }
}Expand description
The version-selecting constructor and aggregating queries for the
TransactionEffects enum. Sealed; implemented only for the enum.
Required Methods§
Sourcefn new_from_execution_v1(
status: ExecutionStatus,
epoch: EpochId,
gas_cost_summary: GasCostSummary,
shared_objects: Vec<SharedInput>,
loaded_per_epoch_config_objects: BTreeSet<ObjectId>,
transaction_digest: TransactionDigest,
lamport_version: SequenceNumber,
changed_objects: BTreeMap<ObjectId, EffectsObjectChange>,
gas_object: Option<ObjectId>,
events_digest: Option<TransactionEventsDigest>,
dependencies: Vec<TransactionDigest>,
) -> Self
fn new_from_execution_v1( status: ExecutionStatus, epoch: EpochId, gas_cost_summary: GasCostSummary, shared_objects: Vec<SharedInput>, loaded_per_epoch_config_objects: BTreeSet<ObjectId>, transaction_digest: TransactionDigest, lamport_version: SequenceNumber, changed_objects: BTreeMap<ObjectId, EffectsObjectChange>, gas_object: Option<ObjectId>, events_digest: Option<TransactionEventsDigest>, dependencies: Vec<TransactionDigest>, ) -> Self
Build effects from the results of executing a transaction under the V1 protocol shape.
Sourcefn new_empty_v1(transaction_digest: TransactionDigest) -> Self
fn new_empty_v1(transaction_digest: TransactionDigest) -> Self
Build empty V1 effects for transaction_digest: success status, no
object changes, and no gas object. For tests that need a placeholder
whose effects content is irrelevant, e.g. system transactions.
Sourcefn execution_digests(&self) -> ExecutionDigests
fn execution_digests(&self) -> ExecutionDigests
Returns the (transaction_digest, effects_digest) pair identifying
this execution.
Sourcefn all_changed_objects(&self) -> Vec<(ObjectRef, Owner, WriteKind)>
fn all_changed_objects(&self) -> Vec<(ObjectRef, Owner, WriteKind)>
Return an iterator that iterates through all changed objects, including mutated, created and unwrapped objects. In other words, all objects that still exist in the object state after this transaction. It doesn’t include deleted/wrapped objects.
Sourcefn all_removed_objects(&self) -> Vec<(ObjectRef, ObjectRemoveKind)>
fn all_removed_objects(&self) -> Vec<(ObjectRef, ObjectRemoveKind)>
Return all objects that existed in the state prior to the transaction but no longer exist in the state after the transaction. It includes deleted and wrapped objects, but does not include unwrapped_then_deleted objects.
Sourcefn all_tombstones(&self) -> Vec<(ObjectId, SequenceNumber)>
fn all_tombstones(&self) -> Vec<(ObjectId, SequenceNumber)>
Returns all objects that will become a tombstone after this transaction. This includes deleted, unwrapped_then_deleted and wrapped objects.
Sourcefn created_then_wrapped_objects(&self) -> Vec<(ObjectId, SequenceNumber)>
fn created_then_wrapped_objects(&self) -> Vec<(ObjectId, SequenceNumber)>
Returns all objects that were created + wrapped in the same transaction.
Sourcefn mutated_excluding_gas(&self) -> Vec<(ObjectRef, Owner)>
fn mutated_excluding_gas(&self) -> Vec<(ObjectRef, Owner)>
Return an iterator of mutated objects, but excluding the gas object.
Sourcefn all_affected_objects(&self) -> Vec<ObjectRef>
fn all_affected_objects(&self) -> Vec<ObjectRef>
Returns all affected objects in this transaction effects. Affected objects include created, mutated, unwrapped, deleted, unwrapped_then_deleted, wrapped and input shared objects.
Sourcefn summary_for_debug(&self) -> TransactionEffectsDebugSummary
fn summary_for_debug(&self) -> TransactionEffectsDebugSummary
Returns a condensed TransactionEffectsDebugSummary suitable for
logging and inspection.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.