Class: Name
Extends
UniffiAbstractObject
Implements
Properties
[destructorGuardSymbol]
readonly [destructorGuardSymbol]: UniffiGcObject;
[pointerLiteralSymbol]
readonly [pointerLiteralSymbol]: bigint;
[uniffiTypeNameSymbol]
readonly [uniffiTypeNameSymbol]: "Name" = "Name";
Methods
equals()
equals(other): boolean;
Parameters
other
Name
Returns
boolean
format()
format(format): string;
Formats a name into a string based on the available output formats.
The default separator is .
Parameters
format
Returns
string
Implementation of
hashCode()
hashCode(): bigint;
Returns
bigint
isSln()
isSln(): boolean;
Returns whether this name is a second-level name (Ex. test.iota)
Returns
boolean
Implementation of
isSubname()
isSubname(): boolean;
Returns whether this name is a subname (Ex. sub.test.iota)
Returns
boolean
Implementation of
label()
label(index): string | undefined;
Get the label at the given index
Parameters
index
number
Returns
string | undefined
Implementation of
labels()
labels(): string[];
Get all of the labels. NOTE: These are in reverse order starting with the top-level name and proceeding to subnames.
Returns
string[]
Implementation of
numLabels()
numLabels(): number;
Returns the number of labels including TLN.
Returns
number
Implementation of
parent()
parent(): NameLike | undefined;
parents; second-level names return None.
Returns
NameLike | undefined
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
fromStr()
static fromStr(s): NameLike;
Parameters
s
string
Returns
instanceOf()
static instanceOf(obj_): obj_ is Name;
Parameters
obj_
any
Returns
obj_ is Name