pub struct ContentFingerprint {
pub content_hash: String,
pub metadata_hash: String,
pub combined_hash: String,
pub created_at: DateTime<Utc>,
pub source_info: SourceInfo,
pub amalgam_version: String,
}Expand description
Universal content fingerprint for change detection
Fields§
§content_hash: StringHash of all content that affects code generation
metadata_hash: StringSource-specific metadata hash (URLs, versions, etc.)
combined_hash: StringCombined hash for quick comparison
created_at: DateTime<Utc>When this fingerprint was created
source_info: SourceInfoSource type and location information
amalgam_version: StringVersion of amalgam that created this fingerprint
Implementations§
Source§impl ContentFingerprint
impl ContentFingerprint
Sourcepub fn content_matches(&self, other: &ContentFingerprint) -> bool
pub fn content_matches(&self, other: &ContentFingerprint) -> bool
Check if this fingerprint represents the same content as another
Sourcepub fn metadata_changed(&self, other: &ContentFingerprint) -> bool
pub fn metadata_changed(&self, other: &ContentFingerprint) -> bool
Check if only metadata changed (requiring regeneration with new timestamps)
Sourcepub fn content_changed(&self, other: &ContentFingerprint) -> bool
pub fn content_changed(&self, other: &ContentFingerprint) -> bool
Check if content changed (requiring full regeneration)
Sourcepub fn short_hash(&self) -> String
pub fn short_hash(&self) -> String
Get a short hash for display purposes
Sourcepub fn save_to_file(&self, path: &Path) -> Result<(), Box<dyn Error>>
pub fn save_to_file(&self, path: &Path) -> Result<(), Box<dyn Error>>
Save fingerprint to a file
Sourcepub fn load_from_file(path: &Path) -> Result<ContentFingerprint, Box<dyn Error>>
pub fn load_from_file(path: &Path) -> Result<ContentFingerprint, Box<dyn Error>>
Load fingerprint from a file
Sourcepub fn fingerprint_path(output_dir: &Path) -> PathBuf
pub fn fingerprint_path(output_dir: &Path) -> PathBuf
Create a fingerprint file path for a package
Trait Implementations§
Source§impl Clone for ContentFingerprint
impl Clone for ContentFingerprint
Source§fn clone(&self) -> ContentFingerprint
fn clone(&self) -> ContentFingerprint
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 ContentFingerprint
impl Debug for ContentFingerprint
Source§impl<'de> Deserialize<'de> for ContentFingerprint
impl<'de> Deserialize<'de> for ContentFingerprint
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 ContentFingerprint
impl RefUnwindSafe for ContentFingerprint
impl Send for ContentFingerprint
impl Sync for ContentFingerprint
impl Unpin for ContentFingerprint
impl UnwindSafe for ContentFingerprint
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