sophia_api::sparql

Trait Query

Source
pub trait Query: Sized {
    type Error: Error + 'static;

    // Required method
    fn parse(query_source: &str) -> Result<Self, Self::Error>;
}
Expand description

Preprocessed query, ready for execution.

This trait exist to allow some implementations of SparqlDataset to mutualize the parsing of queries in the prepare_query method.

Required Associated Types§

Source

type Error: Error + 'static

The error type that might be raised when parsing a query.

Required Methods§

Source

fn parse(query_source: &str) -> Result<Self, Self::Error>

Parse the given text into a Query.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Query for String

Source§

type Error = Infallible

Source§

fn parse(query_source: &str) -> Result<Self, Self::Error>

Implementors§