pub struct FileFactShard {
pub source_uri: String,
pub file_id: FileId,
pub content_hash: u64,
pub producer_schema_version: u32,
pub anchors_hash: Option<u64>,
pub entities_hash: Option<u64>,
pub occurrences_hash: Option<u64>,
pub edges_hash: Option<u64>,
pub anchors: Vec<AnchorFact>,
pub entities: Vec<EntityFact>,
pub occurrences: Vec<OccurrenceFact>,
pub edges: Vec<EdgeFact>,
}Expand description
Write-through semantic fact storage for one indexed file.
Derives Serialize, Deserialize (Campaign 31 PR 5, perl-lsp-swarm#2592)
so the perllsp ripr-facts exporter can serialize the shard into the
ripr-perl-facts-v1 packet. Previously derived only Clone, Debug.
Fields§
§source_uri: StringCanonical file URI for this shard.
file_id: FileIdStable file identifier derived from normalized URI.
content_hash: u64Whole-file content hash used for stale-shard replacement.
producer_schema_version: u32Schema version of the semantic fact producer that built this shard.
Set to crate::semantic::facts::PRODUCER_SCHEMA_VERSION at
construction time. Consumers (e.g. the snapshot layer in #1601)
compare this field against the constant to detect schema drift.
anchors_hash: Option<u64>Optional per-category hashes for change diagnostics.
entities_hash: Option<u64>Optional per-category hashes for change diagnostics.
occurrences_hash: Option<u64>Optional per-category hashes for change diagnostics.
edges_hash: Option<u64>Optional per-category hashes for change diagnostics.
anchors: Vec<AnchorFact>Anchor facts for this file.
entities: Vec<EntityFact>Entity facts for this file.
occurrences: Vec<OccurrenceFact>Occurrence facts for this file.
edges: Vec<EdgeFact>Edge facts for this file.
Trait Implementations§
Source§impl Clone for FileFactShard
impl Clone for FileFactShard
Source§fn clone(&self) -> FileFactShard
fn clone(&self) -> FileFactShard
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more