Implements FromStr for Query

pull/46/head
Tpt 4 years ago
parent 5d54bc2d06
commit ca4421030e
  1. 8
      lib/src/sparql/parser.rs

@ -53,6 +53,14 @@ impl Query {
} }
} }
impl FromStr for Query {
type Err = SparqlParseError;
fn from_str(query: &str) -> Result<Self, SparqlParseError> {
Self::parse(query, None)
}
}
/// Error returned during SPARQL parsing. /// Error returned during SPARQL parsing.
#[derive(Debug)] #[derive(Debug)]
pub struct SparqlParseError { pub struct SparqlParseError {

Loading…
Cancel
Save