pub struct BibLockfile {
pub question_id: String,
pub reader: String,
pub shortlist_hash: String,
pub content_hash: String,
pub scitadel_version: String,
pub algo_hash: String,
pub format: String,
pub format_version: String,
pub generated_at: String,
}Expand description
Sidecar JSON written next to the exported .bib (path =
<output>.scitadel-bib.lock). One sidecar per output file —
per-question scope means several may live in one repo.
Fields§
§question_id: StringResearch question this snapshot was scoped to.
reader: StringReader identity at snapshot time. Mirrors annotation/star scoping — different readers may produce different shortlists.
shortlist_hash: StringSHA-256 of the lex-sorted paper_id\n list. The drift anchor.
content_hash: StringSHA-256 of the emitted .bib bytes. Cheap re-emit skip.
scitadel_version: Stringscitadel binary version that produced this snapshot. Drives
the stale exit code when the binary moves forward.
algo_hash: StringPinned key-generation algorithm hash from ADR-006. Drives the stale exit code when the algorithm itself drifts.
format: StringOutput flavor — "bibtex" here. #135 adds "csl-json".
format_version: StringSchema version of this lockfile.
generated_at: StringRFC3339 timestamp of when the snapshot was written. Excluded from byte-determinism guarantees — snapshot-twice-same-bytes holds for everything else.
Implementations§
Source§impl BibLockfile
impl BibLockfile
Sourcepub fn new_bibtex(
question_id: impl Into<String>,
reader: impl Into<String>,
paper_ids: &[String],
content: &str,
) -> Self
pub fn new_bibtex( question_id: impl Into<String>, reader: impl Into<String>, paper_ids: &[String], content: &str, ) -> Self
Construct a fresh lockfile for a BibTeX snapshot. paper_ids
must be the shortlist’s paper IDs; ordering is normalized
internally so callers don’t have to think about it.
Sourcepub fn new_csl_json(
question_id: impl Into<String>,
reader: impl Into<String>,
paper_ids: &[String],
content: &str,
) -> Self
pub fn new_csl_json( question_id: impl Into<String>, reader: impl Into<String>, paper_ids: &[String], content: &str, ) -> Self
Construct a fresh lockfile for a CSL-JSON snapshot (#135). Same
invariants as Self::new_bibtex — ordering normalized, hashes
computed over the emitted bytes — only the format discriminant
differs so verify can route to the JSON-aware code path.
Trait Implementations§
Source§impl Clone for BibLockfile
impl Clone for BibLockfile
Source§impl Debug for BibLockfile
impl Debug for BibLockfile
Source§impl<'de> Deserialize<'de> for BibLockfile
impl<'de> Deserialize<'de> for BibLockfile
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>,
impl Eq for BibLockfile
Source§impl PartialEq for BibLockfile
impl PartialEq for BibLockfile
Source§impl Serialize for BibLockfile
impl Serialize for BibLockfile
impl StructuralPartialEq for BibLockfile
Auto Trait Implementations§
impl Freeze for BibLockfile
impl RefUnwindSafe for BibLockfile
impl Send for BibLockfile
impl Sync for BibLockfile
impl Unpin for BibLockfile
impl UnsafeUnpin for BibLockfile
impl UnwindSafe for BibLockfile
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.