#[non_exhaustive]pub struct FetchResult {
pub source: String,
pub license: String,
pub pdf_bytes: Option<Bytes>,
pub final_url: Option<Url>,
pub metadata_json: Option<Value>,
}Expand description
What a successful fetch returns to the caller.
Whether pdf_bytes is None depends on the source: metadata-only
sources (Phase 4) leave it unset; OA sources (Phase 1) return PDF bytes
when an OA URL was discovered.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.source: StringSource’s name (matches Source::name()); set for the audit trail.
license: StringOA license string ("CC-BY-4.0", "unknown", etc.).
pdf_bytes: Option<Bytes>PDF bytes; None for metadata-only sources.
final_url: Option<Url>Final URL after redirect resolution; useful for the metadata
[doiget].url field.
metadata_json: Option<Value>Source-side metadata payload as a serde_json value. The Source impl
is responsible for the shape; the caller (Phase 1+ orchestrator)
maps it into Metadata when one exists (Phase 1+).
Trait Implementations§
Source§impl Clone for FetchResult
impl Clone for FetchResult
Source§fn clone(&self) -> FetchResult
fn clone(&self) -> FetchResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for FetchResult
impl RefUnwindSafe for FetchResult
impl Send for FetchResult
impl Sync for FetchResult
impl Unpin for FetchResult
impl UnsafeUnpin for FetchResult
impl UnwindSafe for FetchResult
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
Mutably borrows from an owned value. Read more