The bytes (a view; do not mutate).
StaticcodecTagged-CBOR codec; decode also accepts the untagged form.
StaticfromStaticfromStaticfromStatichashCreate a Reference whose bytes are the SHA-256 digest of the input.
The full 64-character lowercase hex of the reference.
The first 4 bytes of the reference.
The first 4 bytes of the reference, as 8 lowercase hex characters.
The first 4 bytes as upper-case bytewords identifier.
Optionalprefix: string
Optional prefix prepended with a single space.
The first 4 bytes as upper-case bytemojis identifier.
Optionalprefix: string
Optional prefix prepended with a single space.
Backwards-compatible alias of refHex().
Backwards-compatible alias of refHex().
Returns the 32 raw bytes encoded as base64.
Returns a short representation of this reference in the requested format.
Mirrors the legacy TS API; new code should prefer refHexShort,
bytewordsIdentifier, or bytemojiIdentifier directly.
A Reference to this Reference.
SHA-256 of taggedCbor().toCborData().
Digest::from_image(self.tagged_cbor().to_cbor_data()).
The CBOR tags this type decodes from; the first one is used to encode.
Untagged CBOR — a single byte string of the 32 raw bytes.
The tagged CBOR form.
As a UR, typed by the first tag's name.
StaticfromUR representation — ur:reference/..., untagged CBOR payload.
Debug-style representation: Reference(<8-hex-prefix>).
A globally unique reference to a globally unique object.
Internally stores 32 raw bytes. Most callers obtain a
ReferenceviafromDigest, butXID(and similar content-addressable types whose bytes are the reference) construct viafromDatadirectly.