Skip to main content

SparqlClient

Trait SparqlClient 

Source
pub trait SparqlClient: Send + Sync {
    // Required method
    fn query(
        &self,
        endpoint_url: &str,
        sparql: &str,
    ) -> Result<Value, ProjectionError>;
}
Expand description

Pluggable SPARQL transport — production uses ureq, tests use mocks.

Required Methods§

Source

fn query( &self, endpoint_url: &str, sparql: &str, ) -> Result<Value, ProjectionError>

Execute a SPARQL query and return parsed JSON (SPARQL-Results 1.1 shape).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§