pub struct ObjectId(/* private fields */);Expand description
16-byte truncated content-addressed identity for an ECS object.
Spec:
ObjectId = Trunc128(BLAKE3("fsqlite:ecs:v1" || canonical_object_header || payload_hash)).
Implementations§
Source§impl ObjectId
impl ObjectId
Sourcepub const DOMAIN_SEPARATOR: &'static [u8] = ECS_OBJECT_ID_DOMAIN_SEPARATOR
pub const DOMAIN_SEPARATOR: &'static [u8] = ECS_OBJECT_ID_DOMAIN_SEPARATOR
Domain separation prefix from the spec.
Sourcepub const fn from_bytes(bytes: [u8; 16]) -> Self
pub const fn from_bytes(bytes: [u8; 16]) -> Self
Construct from raw bytes.
Sourcepub fn derive_from_canonical_bytes(canonical_bytes: &[u8]) -> Self
pub fn derive_from_canonical_bytes(canonical_bytes: &[u8]) -> Self
Derive an ObjectId from already-canonicalized bytes.
canonical_bytes must be a deterministic, versioned wire-format blob
(spec: “not serde vibes”) representing the object’s header plus its
payload_hash.
Sourcepub fn derive(canonical_object_header: &[u8], payload_hash: PayloadHash) -> Self
pub fn derive(canonical_object_header: &[u8], payload_hash: PayloadHash) -> Self
Derive an ObjectId from canonical header bytes and a payload hash.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ObjectId
impl<'de> Deserialize<'de> for ObjectId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for ObjectId
impl Ord for ObjectId
Source§impl PartialOrd for ObjectId
impl PartialOrd for ObjectId
impl Copy for ObjectId
impl Eq for ObjectId
impl StructuralPartialEq for ObjectId
Auto Trait Implementations§
impl Freeze for ObjectId
impl RefUnwindSafe for ObjectId
impl Send for ObjectId
impl Sync for ObjectId
impl Unpin for ObjectId
impl UnsafeUnpin for ObjectId
impl UnwindSafe for ObjectId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).