#[repr(C)]pub struct CoherenceMeta {
pub coherence_score: u16,
pub mutation_epoch: u64,
pub proof_attestation_hash: [u8; 32],
pub last_access_ns: u64,
pub access_count: u32,
}Expand description
Coherence metadata associated with each vector.
Every vector in a kernel vector store carries coherence metadata enabling the scheduler and proof engine to make informed decisions.
Fields§
§coherence_score: u16Coherence score (0-10000 representing 0.0000-1.0000). Higher scores indicate stronger structural consistency.
mutation_epoch: u64Epoch of the last mutation. Incremented on each vector_put_proved.
proof_attestation_hash: [u8; 32]Hash of the proof attestation that authorized the last mutation.
last_access_ns: u64Timestamp of last access (nanoseconds since boot).
access_count: u32Number of times this vector has been read.
Implementations§
Source§impl CoherenceMeta
impl CoherenceMeta
Sourcepub const fn new(
coherence_score: u16,
mutation_epoch: u64,
proof_attestation_hash: [u8; 32],
) -> Self
pub const fn new( coherence_score: u16, mutation_epoch: u64, proof_attestation_hash: [u8; 32], ) -> Self
Creates new coherence metadata.
Sourcepub fn coherence_as_f32(&self) -> f32
pub fn coherence_as_f32(&self) -> f32
Returns the coherence score as a float (0.0-1.0).
Sourcepub fn with_coherence_f32(coherence: f32, mutation_epoch: u64) -> Self
pub fn with_coherence_f32(coherence: f32, mutation_epoch: u64) -> Self
Creates coherence metadata from a float score.
Trait Implementations§
Source§impl Clone for CoherenceMeta
impl Clone for CoherenceMeta
Source§fn clone(&self) -> CoherenceMeta
fn clone(&self) -> CoherenceMeta
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CoherenceMeta
impl Debug for CoherenceMeta
Source§impl Default for CoherenceMeta
impl Default for CoherenceMeta
Source§impl PartialEq for CoherenceMeta
impl PartialEq for CoherenceMeta
impl Copy for CoherenceMeta
impl Eq for CoherenceMeta
impl StructuralPartialEq for CoherenceMeta
Auto Trait Implementations§
impl Freeze for CoherenceMeta
impl RefUnwindSafe for CoherenceMeta
impl Send for CoherenceMeta
impl Sync for CoherenceMeta
impl Unpin for CoherenceMeta
impl UnsafeUnpin for CoherenceMeta
impl UnwindSafe for CoherenceMeta
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