diff --git a/lib/src/sparql/parser.rs b/lib/src/sparql/parser.rs index 3230c476..dec57ad1 100644 --- a/lib/src/sparql/parser.rs +++ b/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::parse(query, None) + } +} + /// Error returned during SPARQL parsing. #[derive(Debug)] pub struct SparqlParseError {