pub struct SourceRecord {
pub id: String,
pub path: Utf8PathBuf,
pub class: SourceClass,
pub sha256: String,
pub size_bytes: u64,
pub modified: Option<DateTime<Utc>>,
pub blocked: bool,
pub blocked_reason: Option<String>,
}Expand description
One scanned source file.
Fields§
§id: StringStable identifier ({class}:{path} with / separators).
path: Utf8PathBufRepo-relative path, forward-slashed.
class: SourceClass§sha256: Stringsha256 of the file bytes, hex-encoded lowercase.
size_bytes: u64Size in bytes.
modified: Option<DateTime<Utc>>Last-modified time if the filesystem reports one.
Round-4 bughunt #10: the OS-reported mtime is per-machine and
per-checkout. Embedding it in pack.json makes the on-disk shape
non-deterministic across operators with the same commit. #[serde(skip)]
keeps the field in memory (the scanner still populates it for in-process
tools that want to inspect freshness) but excludes it from
serialisation. Deserialisation defaults to None. The deterministic
truth lives in sha256 + the git commit log.
blocked: boolWas this file ignored (matched a blocked-surface rule)?
blocked_reason: Option<String>Reason for blocking, if blocked.
Implementations§
Source§impl SourceRecord
impl SourceRecord
pub fn stable_id(class: SourceClass, path: &Utf8PathBuf) -> String
Trait Implementations§
Source§impl Clone for SourceRecord
impl Clone for SourceRecord
Source§fn clone(&self) -> SourceRecord
fn clone(&self) -> SourceRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more