Skip to main content

Fetcher

Trait Fetcher 

Source
pub trait Fetcher<T>: Execute<T> { }
Expand description

A URL protocol client that retrieves one resource and represents it as RDF.

The program defines supported URL schemes and the mapping from retrieved content to RDF. A single resource may produce many RDF statements. Returning arbitrary response bytes alone does not fulfill the RDF output contract.

§Command-line contract

PROGRAM [OPTIONS] INPUT-URL

One absolute URL is required as a single argument; it is not a stdin payload or an implicitly converted local pathname. RDF is written to stdout using FetcherOptions::output (jsonl by default). The program validates the URL and rejects unsupported schemes.

T is the implementation’s result representation. Retrieval, redirects, authentication, caching, and resource-to-RDF mapping belong to the program. See crate::programs for links to concrete execution behavior and the fetcher specification.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§