Oid
Oid
is the fully qualified identifier of an object across all universes, uniquely identifying the object within the protocol.
Representation
An Oid
can be represented using the following structure:
#![allow(unused)] fn main() { pub struct Oid { universe: u64, set: u64, id: u64, } }
The table below outlines the fields of the Oid
structure:
Size (bytes) | Field | Type | Description |
---|---|---|---|
8 | universe | u64 | The universe ID |
8 | set | u64 | The set ID |
8 | id | u64 | The object ID |
Encoding
The Oid
structure is often encoded as a u256
:
#![allow(unused)] fn main() { (u256(oid.universe) << 128) | (u256(oid.set) << 64) | u256(oid.id) }