The codepoint (an unsigned 64-bit integer)
OptionalassignedName: string
The name the registry gives it, if any
The codepoint, as a number when it is a safe integer and a bigint otherwise.
The codepoint as a bigint.
The registry name, if one was assigned.
The assigned name, or the decimal codepoint when there is none.
StaticcodecTagged-CBOR codec. decode requires #6.40000(n) — the tag is part of
the type, as in the reference's TryFrom<CBOR>; use fromUntaggedCbor
for the bare unsigned integer. tags is named from the global tags store
at each access, as the reference's cbor_tags() is.
StaticfromThe same as the constructor, for call chains.
OptionalassignedName: stringStaticisWhether x is a KnownValue, from this module copy or another: checks
the brand, not instanceof.
Two known values are equal when their codepoints are, whatever their
names and whichever module copy built them; anything that is not a
KnownValue is not equal.
name.
SHA-256 of the tagged CBOR.
The known-value tag (40000), named as the global tags store names it at the time.
The bare unsigned integer.
#6.40000(value).
StaticfromDecode #6.40000(n) (the reference's TryFrom<CBOR>). Negative content
wraps as KnownValue.fromUntaggedCbor describes.
StaticfromDecode the bare integer n — the content of tag 40000 (the reference's
from_untagged_cbor), as a tag summariser or a decoder that has already
stripped the tag holds it. A negative integer node wraps to 2⁶⁴ + n,
as the reference's u64::try_from does (dcbor's negative-to-unsigned
wrap), so 40000(-1) is the codepoint 18446744073709551615; a whole
float head that dcbor turns into an integer node follows the same rule.
A known value: a codepoint (an unsigned 64-bit integer) with, optionally, the name a registry assigns it.
Equality is by codepoint (
equals), whatever the names, and across module copies. Compare withequals:===may hold for the constants the global registry is seeded with but is not guaranteed, because directory entries and registrations replace the registered objects. Instances are frozen (a constant cannot be renamed process-wide) and every constructor argument is checked: the codepoint must be a non-negative safe integernumberor abigintin0 ..= 2⁶⁴ − 1(usebigintfor exact codepoints above the safe number range), the name astring.