pub trait TransactionEffectsAPIForTesting: TransactionEffectsAPI {
// Required methods
fn gas_cost_summary_mut_for_testing(&mut self) -> &mut GasCostSummary;
fn dependencies_mut_for_testing(&mut self) -> &mut Vec<TransactionDigest>;
fn unsafe_add_read_only_shared_object_for_testing(
&mut self,
object: ObjectReference,
);
fn unsafe_add_mutated_shared_object_for_testing(
&mut self,
object: ObjectReference,
);
fn unsafe_add_deleted_live_object_for_testing(
&mut self,
object_ref: ObjectReference,
);
fn unsafe_add_object_tombstone_for_testing(
&mut self,
object_ref: ObjectReference,
);
}Expand description
Test-only mutators for [TransactionEffects] that bypass the normal
invariants. Not for production use.
Required Methods§
Sourcefn gas_cost_summary_mut_for_testing(&mut self) -> &mut GasCostSummary
fn gas_cost_summary_mut_for_testing(&mut self) -> &mut GasCostSummary
Returns a mutable reference to the gas cost summary, for tests.
Sourcefn dependencies_mut_for_testing(&mut self) -> &mut Vec<TransactionDigest>
fn dependencies_mut_for_testing(&mut self) -> &mut Vec<TransactionDigest>
Returns a mutable reference to the dependency list, for tests.
Records a shared object these effects read without changing, for tests. Unsafe: makes no attempt to keep the effects self-consistent.
Records a shared object these effects took mutably, for tests. Unsafe: makes no attempt to keep the effects self-consistent.
Sourcefn unsafe_add_deleted_live_object_for_testing(
&mut self,
object_ref: ObjectReference,
)
fn unsafe_add_deleted_live_object_for_testing( &mut self, object_ref: ObjectReference, )
Records an entry that represents the pre-execution version of a still live object, without validating consistency with the rest of the effects. For tests only.
Sourcefn unsafe_add_object_tombstone_for_testing(
&mut self,
object_ref: ObjectReference,
)
fn unsafe_add_object_tombstone_for_testing( &mut self, object_ref: ObjectReference, )
Records a tombstone entry for a deleted object, without validating consistency with the rest of the effects. For tests only.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".