pub struct ModelProvenance {
pub model: EmbeddingModel,
pub model_id: String,
pub hash: String,
pub loaded_at: SystemTime,
pub loaded_at_iso: String,
}Expand description
Stable: external consumers may depend on this; breaking changes require a SemVer bump.
Records the model source and metadata for a load event.
See docs/model.md for hash semantics and verification boundaries.
Fields§
§model: EmbeddingModelStable: model variant that was loaded.
model_id: StringStable: source identifier (HuggingFace ID, URL, or file path).
hash: StringStable: metadata-derived BLAKE3 identifier for this load event, not a weight checksum.
loaded_at: SystemTimeStable: when the model was loaded.
loaded_at_iso: StringStable: formatted timestamp string for convenience.
Implementations§
Source§impl ModelProvenance
impl ModelProvenance
Sourcepub fn new(model: EmbeddingModel, model_id: String) -> Self
pub fn new(model: EmbeddingModel, model_id: String) -> Self
Stable: create new provenance information for a loaded model.
Sourcepub fn dimensions(&self) -> usize
pub fn dimensions(&self) -> usize
Stable: get the model dimensions.
Sourcepub fn matches_model(&self, expected: EmbeddingModel) -> bool
pub fn matches_model(&self, expected: EmbeddingModel) -> bool
Stable: check if this provenance matches expected model.
Trait Implementations§
Source§impl Clone for ModelProvenance
impl Clone for ModelProvenance
Source§fn clone(&self) -> ModelProvenance
fn clone(&self) -> ModelProvenance
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ModelProvenance
impl Debug for ModelProvenance
Source§impl<'de> Deserialize<'de> for ModelProvenance
impl<'de> Deserialize<'de> for ModelProvenance
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
Auto Trait Implementations§
impl Freeze for ModelProvenance
impl RefUnwindSafe for ModelProvenance
impl Send for ModelProvenance
impl Sync for ModelProvenance
impl Unpin for ModelProvenance
impl UnsafeUnpin for ModelProvenance
impl UnwindSafe for ModelProvenance
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