pub struct QuinRef { /* private fields */ }Expand description
An opaque 48-byte handle to a Super-Quin / NQuin (T7).
Scripts do not see the raw subject/predicate/object/context/
metadata/parity fields. The handle is a content-addressed reference
that the host resolves. This replaces Value::Quin { s, p, o, c } as
the preferred representation — Quin remains for backward compatibility
but new code should use QuinRef.
The 6 × u64 fields are the full NQuin payload (subject, predicate,
object, context, metadata, parity) but they are opaque to scripts —
the as_quin_ref() accessor returns the handle, not the fields.
Host code can access the raw fields via raw_fields().
Implementations§
Source§impl QuinRef
impl QuinRef
Sourcepub fn from_raw(
subject: u64,
predicate: u64,
object: u64,
context: u64,
metadata: u64,
parity: u64,
) -> Self
pub fn from_raw( subject: u64, predicate: u64, object: u64, context: u64, metadata: u64, parity: u64, ) -> Self
Create a QuinRef from raw NQuin fields (host-side only).
Sourcepub fn from_quin(
subject: u64,
predicate: u64,
object: u64,
context: u64,
) -> Self
pub fn from_quin( subject: u64, predicate: u64, object: u64, context: u64, ) -> Self
Create a QuinRef from a Value::Quin (which has 4 fields; metadata
and parity are computed).
Sourcepub fn raw_fields(&self) -> [u64; 6]
pub fn raw_fields(&self) -> [u64; 6]
Access the raw 6 × u64 payload (host-side only). Scripts never see this — it’s for the host to resolve the handle to graph data.
Sourcepub fn content_hash(&self) -> u64
pub fn content_hash(&self) -> u64
The content hash of this QuinRef — used for deduplication and provenance tracking. Position-dependent (FNV-1a style).
Trait Implementations§
impl Copy for QuinRef
impl Eq for QuinRef
impl StructuralPartialEq for QuinRef
Auto Trait Implementations§
impl Freeze for QuinRef
impl RefUnwindSafe for QuinRef
impl Send for QuinRef
impl Sync for QuinRef
impl Unpin for QuinRef
impl UnsafeUnpin for QuinRef
impl UnwindSafe for QuinRef
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.