pub struct VectorProvenance {
pub model_id: Option<String>,
pub codec: CodecKind,
pub codec_version: u16,
pub rotation_seed: Option<u64>,
pub dim: usize,
pub metric: DistanceMetric,
pub source_hash: Option<String>,
pub lineage: Vec<String>,
}Expand description
Provenance every stored vector carries (ADR-297 §7). Snapshots must be reproducible from (source, provenance) alone — which is why rotation seeds are recorded and codecs are versioned.
Fields§
§model_id: Option<String>Embedding model identity (e.g. “text-embedding-3-large”).
codec: CodecKindRepresentation of the stored blob.
codec_version: u16Version of that codec’s layout/tables. Bump on any change that alters encoded bytes for identical input.
rotation_seed: Option<u64>Rotation seed for rotated codecs (Turbo4, RaBitQ).
dim: usizeDimensionality.
metric: DistanceMetricDistance metric the codes were prepared for.
source_hash: Option<String>Hex SHA-256 of the source object, when known.
lineage: Vec<String>Migration lineage, oldest first (e.g. “fp32→turbo4@2026-08-06”).
Implementations§
Source§impl VectorProvenance
impl VectorProvenance
Sourcepub fn new(codec: &dyn VectorCodec, metric: DistanceMetric) -> Self
pub fn new(codec: &dyn VectorCodec, metric: DistanceMetric) -> Self
Provenance for a freshly encoded vector under codec.
Sourcepub fn push_migration(&mut self, entry: impl Into<String>)
pub fn push_migration(&mut self, entry: impl Into<String>)
Record a migration step (old codec → new codec).
Trait Implementations§
Source§impl Clone for VectorProvenance
impl Clone for VectorProvenance
Source§impl Debug for VectorProvenance
impl Debug for VectorProvenance
Source§impl<'de> Deserialize<'de> for VectorProvenance
impl<'de> Deserialize<'de> for VectorProvenance
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 PartialEq for VectorProvenance
impl PartialEq for VectorProvenance
Source§impl Serialize for VectorProvenance
impl Serialize for VectorProvenance
impl StructuralPartialEq for VectorProvenance
Auto Trait Implementations§
impl Freeze for VectorProvenance
impl RefUnwindSafe for VectorProvenance
impl Send for VectorProvenance
impl Sync for VectorProvenance
impl Unpin for VectorProvenance
impl UnsafeUnpin for VectorProvenance
impl UnwindSafe for VectorProvenance
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
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
Converts
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> ⓘ
Converts
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