#[non_exhaustive]pub struct MetadataOnlyOutcome {
pub source: String,
pub resolver_profile: String,
pub license: Option<String>,
pub oa_url: Option<String>,
pub metadata: Value,
}Expand description
Outcome of a successful metadata_only call.
Mirrors the wire shape documented in docs/MCP_TOOLS.md §11: the
source identifies which resolver produced the metadata, license
is the OA license string when known (Unpaywall channel), oa_url is
the discovered OA URL (never followed by this orchestrator), and
metadata is the source’s native JSON payload (Crossref message,
Unpaywall work record, or the parsed arXiv Atom-feed object).
metadata is serialized as-is by the MCP envelope builder
(crates/doiget-mcp/src/lib.rs); we deliberately do NOT normalize
here so the agent can see exactly what the source returned.
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.source: StringResolver key that produced the metadata payload. One of
"crossref", "unpaywall", "arxiv" (the closed set named in
docs/MCP_TOOLS.md §11 type alias).
resolver_profile: StringResolver profile under which the canonical-digest (ADR-0021 §1)
was minted for this call. In Slice 4 this equals
Self::source verbatim (the metadata-only path emits one row
per consulted resolver); future slices that introduce overlapping
resolvers MAY have resolver_profile != source. Surfaced through
the doiget_metadata_only MCP envelope per ADR-0021 §4.
license: Option<String>OA license string when the resolver could supply one (today only
the Unpaywall fallback path populates this). None when the
primary source did not surface a license.
oa_url: Option<String>Discovered OA URL — surfaced to the caller for separate action,
never followed by this orchestrator. The Crossref response’s
message.link[] array is mined first; the Unpaywall fallback
path uses best_oa_location.url_for_pdf (or url).
metadata: ValueSource’s native metadata payload. For Crossref this is the
message object; for Unpaywall the work record; for arXiv the
parsed Atom-feed JSON (see
crate::sources::arxiv::parse_atom_feed).
Trait Implementations§
Source§impl Clone for MetadataOnlyOutcome
impl Clone for MetadataOnlyOutcome
Source§fn clone(&self) -> MetadataOnlyOutcome
fn clone(&self) -> MetadataOnlyOutcome
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more