Skip to main content

Name

type Name​

type Name struct {
// contains filtered or unexported fields
}

func LiftFromExternalName​

func LiftFromExternalName(handle uint64) *Name

func NameFromStr​

func NameFromStr(s string) (*Name, error)

func (*Name) DebugString​

func (_self *Name) DebugString() string

func (*Name) Destroy​

func (object *Name) Destroy()

func (*Name) Eq​

func (_self *Name) Eq(other *Name) bool

func (*Name) Format​

func (_self *Name) Format(format NameFormat) string

Formats a name into a string based on the available output formats. The default separator is `.`

A name decoded from BCS is not validated. One without a second-level name or with a top-level name other than `iota` has no AT form and is formatted in the DOT format.

func (*Name) Hash​

func (_self *Name) Hash() uint64

func (*Name) IsSln​

func (_self *Name) IsSln() bool

Returns whether this name is a second-level name (Ex. `test.iota`)

func (*Name) IsSubname​

func (_self *Name) IsSubname() bool

Returns whether this name is a subname (Ex. `sub.test.iota`)

func (*Name) Label​

func (_self *Name) Label(index uint32) *string

Get the label at the given index

func (*Name) Labels​

func (_self *Name) Labels() []string

Get all of the labels. NOTE: These are in reverse order starting with the top-level name and proceeding to subnames.

func (*Name) Ne​

func (_self *Name) Ne(other *Name) bool

func (*Name) NumLabels​

func (_self *Name) NumLabels() uint32

Returns the number of labels including TLN.

func (*Name) Parent​

func (_self *Name) Parent() **Name

parents; second-level names return `None`.

func (*Name) String​

func (_self *Name) String() string

func (*Name) ToDisplayString​

func (_self *Name) 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.