Class: Owner
Enum of different types of ownership for an object.
BCS
The BCS serialized form of this type is specified in
bcs-schema.abnf.
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
toBcs()
toBcs(): ArrayBuffer;
Convert this type to BCS encoded bytes.
Returns
ArrayBuffer
Implementation of
toDebugString()
toDebugString(): string;
Returns
string
toDisplayString()
toDisplayString(): string;
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.
Returns
string
Implementation of
toJson()
toJson(): string;
Convert this type to a JSON encoded string.
Returns
string
Implementation of
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
fromBcs()
static fromBcs(bcs): OwnerLike;
Create this type from BCS encoded bytes.
Parameters
bcs
ArrayBuffer
Returns
fromJson()
static fromJson(json): OwnerLike;
Create this type from a JSON encoded string.
Parameters
json
string
Returns
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;