#[repr(C, align(16))]pub struct NQuin {
pub subject: u64,
pub predicate: u64,
pub object: u64,
pub context: u64,
pub metadata: u64,
pub parity: u64,
}Expand description
Bare-metal 40-byte continuous statement container for the Qualia engine. Fully optimized for zero-copy memory operations on post-2020 architectures.
Fields§
§subject: u64Subject identifier code reference index
predicate: u64Predicate relation code reference index
object: u64Object value or entity code reference index
context: u64Graph Context identifier code reference index
metadata: u64The Fifth Vector: Metadata, Policy bitmasks, and geometric traits
parity: u64The Sixth Vector: ECC Parity and Checksum bits (making the Quin 48 bytes)
Implementations§
Source§impl NQuin
impl NQuin
pub const SENSITIVITY_PUBLIC: u8 = 0x00
pub const SENSITIVITY_RESTRICTED: u8 = 0x01
pub const SENSITIVITY_CLASSIFIED: u8 = 0x02
pub const SENSITIVITY_TIER_PUBLIC: u8 = 0x00
pub const SENSITIVITY_TIER_PROFESSIONAL: u8 = 0x01
pub const SENSITIVITY_TIER_LEGAL: u8 = 0x02
pub const SENSITIVITY_TIER_MEDICAL: u8 = 0x03
pub const SENSITIVITY_TIER_FIDUCIARY: u8 = 0x04
pub fn is_subject_nested(&self) -> bool
pub fn get_subject_literal_id(&self) -> u64
pub fn identify_routing_lane(&self) -> PermissiveRoutingLane
pub fn get_sensitivity_byte(&self) -> u8
pub fn set_sensitivity_byte(&mut self, sensitivity: u8)
pub fn get_quin_type(&self) -> u8
Sourcepub fn set_quin_type(&mut self, quin_type: u8)
pub fn set_quin_type(&mut self, quin_type: u8)
Write the 4-bit Quin Type nibble into bits [63:60], preserving all other bits.
Sourcepub fn get_sensitivity_tier(&self) -> u8
pub fn get_sensitivity_tier(&self) -> u8
Read the 4-bit ODRL sensitivity tier from bits [59:56].
Sourcepub fn set_sensitivity_tier(&mut self, tier: u8)
pub fn set_sensitivity_tier(&mut self, tier: u8)
Write the 4-bit ODRL sensitivity tier into bits [59:56], preserving all other bits.
Sourcepub fn extract_lamport_clock(&self) -> u32
pub fn extract_lamport_clock(&self) -> u32
Extracts the 32-bit Lamport logical clock from bits [31:0].
Sourcepub fn set_lamport_clock(&mut self, clock: u32)
pub fn set_lamport_clock(&mut self, clock: u32)
Sets the 32-bit Lamport logical clock in bits [31:0], preserving all upper bits.
Sourcepub fn extract_clean_metadata_value(&self) -> u64
pub fn extract_clean_metadata_value(&self) -> u64
Returns bits [31:0] of the metadata field.
After the v3 migration this is the Lamport clock; call extract_lamport_clock()
directly for clarity in new code.
Sourcepub fn calculate_parity(
subject: u64,
predicate: u64,
object: u64,
context: u64,
metadata: u64,
) -> u64
pub fn calculate_parity( subject: u64, predicate: u64, object: u64, context: u64, metadata: u64, ) -> u64
XOR parity over the five semantic fields. Store in parity at creation time;
call verify_ecc_parity() to confirm integrity.
pub fn verify_ecc_parity(&self) -> bool
Sourcepub fn recalculate_parity(&mut self)
pub fn recalculate_parity(&mut self)
Recalculate and store ECC parity after mutating any field.
pub fn new_conduct_violation(reason: &[u8]) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NQuin
impl<'de> Deserialize<'de> for NQuin
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>,
Source§impl Ord for NQuin
impl Ord for NQuin
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for NQuin
impl PartialOrd for NQuin
Source§impl QuinPointerExt for NQuin
impl QuinPointerExt for NQuin
fn extract_modality_flag(&self) -> u8
fn extract_byte_offset(&self) -> u64
impl Copy for NQuin
impl Eq for NQuin
impl Pod for NQuin
impl StructuralPartialEq for NQuin
Auto Trait Implementations§
impl Freeze for NQuin
impl RefUnwindSafe for NQuin
impl Send for NQuin
impl Sync for NQuin
impl Unpin for NQuin
impl UnsafeUnpin for NQuin
impl UnwindSafe for NQuin
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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.§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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more