_algopy_testing.mutable
¶
Module Contents¶
Classes¶
Helper class to ensure mutable algopy types (currently ARC4 array, tuple and structs) cascade their changes to parent container types (global/local state, boxes, ARC4 array, tuple and structs) |
Functions¶
Used to update a container-like type when an item is modified. |
|
Used to update an object-like type when an attr is modified. |
|
Add on_mutate callback to value, if value is mutable. |
API¶
- class MutableBytes¶
Helper class to ensure mutable algopy types (currently ARC4 array, tuple and structs) cascade their changes to parent container types (global/local state, boxes, ARC4 array, tuple and structs)
Initialization
- set_item_on_mutate( ) _algopy_testing.mutable.TItem ¶
Used to update a container-like type when an item is modified.
- set_attr_on_mutate( ) _algopy_testing.mutable.TItem ¶
Used to update an object-like type when an attr is modified.
- add_mutable_callback(
- on_mutate: collections.abc.Callable[[Any], None],
- value: _algopy_testing.mutable.TItem,
Add on_mutate callback to value, if value is mutable.
Returns value to simplify usage