#[non_exhaustive]pub struct EntryInfo {
pub safekey: Safekey,
pub title: String,
pub year: Option<i32>,
pub fetched_at: Option<DateTime<Utc>>,
pub size_bytes: Option<u64>,
}Expand description
Brief summary of a stored entry; returned by
Store::list_recent / Store::search.
non_exhaustive so adding new summary fields (e.g. doi, authors) in a
later revision is non-breaking. Pattern-match with a wildcard arm.
Serialize enables list-recent --mode json / search --mode json
(#204) — the wire form is the obvious field-name JSON: {"safekey": "...", "title": "...", "year": 2024, "fetched_at": "2026-05-20T…Z"},
with null for absent optionals.
§Wire-format stability (post-#208 self-review §1)
Once a release ships with the [Serialize] derive, the field
names below become part of the public API: a downstream consumer
(CLI agent, MCP tool, BiblioFetch.jl, third-party script) MAY bind
to them. Renaming a field is then a semver minor bump and warrants
a CHANGELOG [BREAKING] note. Adding new fields is still safe
(per #[non_exhaustive]).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.safekey: SafekeyThe safekey of the entry. See docs/SAFEKEY.md.
title: StringTitle from the entry’s reserved title field.
year: Option<i32>Year, if any, from the entry’s reserved year field.
fetched_at: Option<DateTime<Utc>>fetched_at from the [doiget] table, if any.
size_bytes: Option<u64>size_bytes from the [doiget] table: the size of the stored PDF,
0 for a metadata-only entry, None when the entry has no
[doiget] table at all.
#481: without it the inventory commands could not tell a fetched
paper from a metadata-only stub. Every other surface could – the
fetch itself failed loudly, the TOML omits pdf_path, the
provenance log carries an err row, doiget info shows
size_bytes = 0 – and the one command that answers “what do I
have?” without knowing the ref in advance was the one that dropped
it. Fifty refs with ten blocked listed as fifty identical rows.
Implementations§
Source§impl EntryInfo
impl EntryInfo
Sourcepub fn has_pdf(&self) -> bool
pub fn has_pdf(&self) -> bool
Whether a PDF was actually stored for this entry.
false for a metadata-only entry (size_bytes == 0) and for one
with no [doiget] table. Deliberately not “is this entry useful” –
a metadata-only entry is a legitimate result, it is just a different
one, and #118 is the standing rule that the two must not be
presented alike.