Class: Owner
Enum of different types of ownership for an object.
BCS
The BCS serialized form for this type is defined by the following ABNF:
owner = owner-address / owner-object / owner-shared / owner-immutable
owner-address = %d00 address
owner-object = %d01 object-id
owner-shared = %d02 u64
owner-immutable = %d03
Extends
UniffiAbstractObject
Implements
Properties
[destructorGuardSymbol]
readonly [destructorGuardSymbol]: UniffiGcObject;
[pointerLiteralSymbol]
readonly [pointerLiteralSymbol]: bigint;
[uniffiTypeNameSymbol]
readonly [uniffiTypeNameSymbol]: "Owner" = "Owner";
Methods
addressOrObject()
addressOrObject(): AddressLike | undefined;
Returns an Address if this object is owned by an address or
object, and None if it is shared or immutable.
Returns
AddressLike | undefined
Implementation of
asAddress()
asAddress(): AddressLike;
Convert this owner into an address owner if it is one, or panic otherwise
Returns
Implementation of
asObject()
asObject(): ObjectIdLike;
Convert this owner into an object owner if it is one, or panic otherwise
Returns
Implementation of
asOptAddress()
asOptAddress(): AddressLike | undefined;
Convert this owner into an address owner if it is one, or return None
otherwise
Returns
AddressLike | undefined
Implementation of
asOptObject()
asOptObject(): ObjectIdLike | undefined;
Convert this owner into an object owner if it is one, or return None
otherwise
Returns
ObjectIdLike | undefined
Implementation of
asOptShared()
asOptShared(): VersionLike | undefined;
Convert this owner into a shared owner if it is one, or return None
otherwise
Returns
VersionLike | undefined
Implementation of
asShared()
asShared(): VersionLike;
Convert this owner into a shared owner if it is one, or panic otherwise
Returns
Implementation of
equals()
equals(other): boolean;
Parameters
other
Owner
Returns
boolean
hashCode()
hashCode(): bigint;
Returns
bigint
isAddress()
isAddress(): boolean;
Check if this is an address owner
Returns
boolean
Implementation of
isImmutable()
isImmutable(): boolean;
Check if this is an immutable owner
Returns
boolean
Implementation of
isObject()
isObject(): boolean;
Check if this is an object owner
Returns
boolean
Implementation of
isShared()
isShared(): boolean;
Check if this is a shared owner
Returns
boolean
Implementation of
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
instanceOf()
static instanceOf(obj_): obj_ is Owner;
Parameters
obj_
any
Returns
obj_ is Owner
newAddress()
static newAddress(address): OwnerLike;
Parameters
address
Returns
newImmutable()
static newImmutable(): OwnerLike;
Returns
newObject()
static newObject(id): OwnerLike;
Parameters
id
Returns
newShared()
static newShared(version): OwnerLike;