sophia_api::sparql

Trait IntoQuery

Source
pub trait IntoQuery<Q: Query> {
    type Out: Borrow<Q>;

    // Required method
    fn into_query(self) -> Result<Self::Out, Q::Error>;
}
Expand description

A utility trait to allow SparqlDataset::query to accept either &str or Self::Query.

Required Associated Types§

Source

type Out: Borrow<Q>

The ouput type of into_query.

Required Methods§

Source

fn into_query(self) -> Result<Self::Out, Q::Error>

Convert self to a Query.

Implementations on Foreign Types§

Source§

impl<'a, Q> IntoQuery<Q> for &'a str
where Q: Query,

Source§

type Out = Q

Source§

fn into_query(self) -> Result<Self::Out, Q::Error>

Source§

impl<'a, Q> IntoQuery<Q> for &'a Q
where Q: Query,

Source§

type Out = &'a Q

Source§

fn into_query(self) -> Result<Self::Out, Q::Error>

Implementors§