UpgradePolicy
UpgradePolicy Objects
class UpgradePolicy(UpgradePolicyProtocol)
Representation of upgrade policy constants in iota::package.
additive
@classmethod
def additive(cls) -> UpgradePolicy
Allows adding new functionalities (e.g., new public functions or structs) but restricts changes to existing functionalities.
compatible
@classmethod
def compatible(cls) -> UpgradePolicy
The least restrictive policy. Permits changes to all function implementations, the removal of ability constraints on generic type parameters in function signatures, and modifications to private, public(friend), and entry function signatures. However, public function signatures and existing types cannot be changed.
dep_only
@classmethod
def dep_only(cls) -> UpgradePolicy
Limits modifications to the package’s dependencies only.
as_u8
def as_u8() -> int
Returns the internal representation.
to_display_string
def to_display_string() -> str
Render this type as human-readable text.
Some types also print this through the binding's native string conversion; this method is the spelling every object type has.
The layout is meant for reading and can change between releases. Use the JSON or BCS conversions for output that gets parsed.