Skip to main content

TransactionEffectsAPIForTesting

Trait TransactionEffectsAPIForTesting 

Source
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§

Source

fn gas_cost_summary_mut_for_testing(&mut self) -> &mut GasCostSummary

Returns a mutable reference to the gas cost summary, for tests.

Source

fn dependencies_mut_for_testing(&mut self) -> &mut Vec<TransactionDigest>

Returns a mutable reference to the dependency list, for tests.

Source

fn unsafe_add_read_only_shared_object_for_testing( &mut self, object: ObjectReference, )

Records a shared object these effects read without changing, for tests. Unsafe: makes no attempt to keep the effects self-consistent.

Source

fn unsafe_add_mutated_shared_object_for_testing( &mut self, object: ObjectReference, )

Records a shared object these effects took mutably, for tests. Unsafe: makes no attempt to keep the effects self-consistent.

Source

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.

Source

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".

Implementations on Foreign Types§

Source§

impl TransactionEffectsAPIForTesting for TransactionEffects

Source§

fn gas_cost_summary_mut_for_testing(&mut self) -> &mut GasCostSummary

Source§

fn dependencies_mut_for_testing(&mut self) -> &mut Vec<TransactionDigest>

Source§

fn unsafe_add_read_only_shared_object_for_testing( &mut self, object: ObjectReference, )

Source§

fn unsafe_add_mutated_shared_object_for_testing( &mut self, object: ObjectReference, )

Source§

fn unsafe_add_deleted_live_object_for_testing( &mut self, object_ref: ObjectReference, )

Source§

fn unsafe_add_object_tombstone_for_testing( &mut self, object_ref: ObjectReference, )

Implementors§