Skip to main content

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.