Skip to main content

ServiceClient

Trait ServiceClient 

Source
pub trait ServiceClient: Send + Sync {
    // Required method
    fn query(&self, endpoint: &str, query: &str) -> Result<Vec<Binding>, String>;
}
Expand description

Executes one SPARQL query against a remote endpoint (the SPARQL Protocol) and returns its solutions. Implementations own transport, auth, and timeouts; they typically POST the query with Accept: application/sparql-results+json and feed the body through parse_sparql_json_results. Errors are strings, surfaced verbatim as the query error (or, under SERVICE SILENT, swallowed per the spec) — name the endpoint in the message, the engine adds no prefix.

Required Methods§

Source

fn query(&self, endpoint: &str, query: &str) -> Result<Vec<Binding>, String>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§