Skip to main content

Class: UpgradePolicy

Representation of upgrade policy constants in iota::package.

Extends​

  • UniffiAbstractObject

Implements​

Properties​

[destructorGuardSymbol]​

readonly [destructorGuardSymbol]: UniffiGcObject;

[pointerLiteralSymbol]​

readonly [pointerLiteralSymbol]: bigint;

[uniffiTypeNameSymbol]​

readonly [uniffiTypeNameSymbol]: "UpgradePolicy" = "UpgradePolicy";

Methods​

asU8()​

asU8(): number;

Returns the internal representation.

Returns​

number

Implementation of​

UpgradePolicyLike.asU8


equals()​

equals(other): boolean;

Parameters​

other​

UpgradePolicy

Returns​

boolean


toDebugString()​

toDebugString(): string;

Returns​

string


toString()​

toString(): string;

Returns a string representation of an object.

Returns​

string


uniffiDestroy()​

uniffiDestroy(): void;

Explicitly tell Rust to destroy the native peer that backs this object.

Once this method has been called, any following method calls will throw an error.

Can be called more than once.

Returns​

void

Overrides​

UniffiAbstractObject.uniffiDestroy

uniffiUse()​

uniffiUse<T>(block): T;

A convenience method to use this object, then destroy it after its use.

Type Parameters​

T​

T

Parameters​

block​

(obj) => T

Returns​

T

Inherited from​

UniffiAbstractObject.uniffiUse

additive()​

static additive(): UpgradePolicyLike;

Allows adding new functionalities (e.g., new public functions or structs) but restricts changes to existing functionalities.

Returns​

UpgradePolicyLike


compatible()​

static compatible(): UpgradePolicyLike;

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.

Returns​

UpgradePolicyLike


depOnly()​

static depOnly(): UpgradePolicyLike;

Limits modifications to the package’s dependencies only.

Returns​

UpgradePolicyLike


instanceOf()​

static instanceOf(obj_): obj_ is UpgradePolicy;

Parameters​

obj_​

any

Returns​

obj_ is UpgradePolicy