type Key [16]byte Keys need not be unique: several entries may share one, and DenseIndexOn.Count reports how many. Integer identities park in the low eight bytes, so KeyFromUint64(42) prints as 00000000-0000-0000-0000-00000000002a.
A key is 128 bits of opaque identity, rendered as a lowercase dashed UUID.
Keys need not be unique: several entries may share one, and Count reports how many.
key := usearch.KeyFromUint64(42)
fmt.Println(key) // 00000000-0000-0000-0000-00000000002a
value, integral := key.Uint64() // 42, true
parsed, err := usearch.ParseKey("00000000-0000-0000-0000-00000000002a")Keys satisfy encoding.TextMarshaler and encoding.TextUnmarshaler, so they round-trip through JSON as those same strings.
KeyKey is a 128-bit entry identity, most significant byte first, rendered as a lowercase dashed UUID.8type Key [16]byte Keys need not be unique: several entries may share one, and DenseIndexOn.Count reports how many. Integer identities park in the low eight bytes, so KeyFromUint64(42) prints as 00000000-0000-0000-0000-00000000002a.
NilKeyNilKey is the all-zero key.var NilKey Key KeyFromUint64KeyFromUint64 parks an integer identity in the low eight bytes, zeroing the rest.func KeyFromUint64(value uint64) Key ParseKeyParseKey reads the rendering String produces.AppendTextAppendText implements encoding.TextAppender.func (key Key) AppendText(buffer []byte) ([]byte, error) MarshalTextMarshalText implements encoding.TextMarshaler, so a key inside a struct round-trips through JSON as the dashed UUID String prints.func (key Key) MarshalText() ([]byte, error) StringString renders the key as a lowercase dashed UUID.func (key Key) String() string Uint64Uint64 reports the integer identity in the low eight bytes, and false when the high eight carry anything.func (key Key) Uint64() (uint64, bool) UnmarshalTextUnmarshalText implements encoding.TextUnmarshaler.func (key *Key) UnmarshalText(text []byte) error