Makes syntax enumerations non exhaustive

pull/46/head
Tpt 4 years ago
parent 0bc5e235eb
commit 7f418fffc3
  1. 6
      lib/src/io/syntax.rs
  2. 3
      lib/src/sparql/model.rs

@ -17,7 +17,10 @@ pub trait FileSyntax: Sized {
} }
/// [RDF graph](https://www.w3.org/TR/rdf11-concepts/#dfn-graph) serialization formats. /// [RDF graph](https://www.w3.org/TR/rdf11-concepts/#dfn-graph) serialization formats.
///
/// This enumeration is non exhaustive. New syntaxes like JSON-LD will be added in the future.
#[derive(Eq, PartialEq, Debug, Clone, Copy, Hash)] #[derive(Eq, PartialEq, Debug, Clone, Copy, Hash)]
#[non_exhaustive]
pub enum GraphSyntax { pub enum GraphSyntax {
/// [N-Triples](https://www.w3.org/TR/n-triples/) /// [N-Triples](https://www.w3.org/TR/n-triples/)
NTriples, NTriples,
@ -119,7 +122,10 @@ impl FileSyntax for GraphSyntax {
} }
/// [RDF dataset](https://www.w3.org/TR/rdf11-concepts/#dfn-rdf-dataset) serialization formats. /// [RDF dataset](https://www.w3.org/TR/rdf11-concepts/#dfn-rdf-dataset) serialization formats.
///
/// This enumeration is non exhaustive. New syntaxes like JSON-LD will be added in the future.
#[derive(Eq, PartialEq, Debug, Clone, Copy, Hash)] #[derive(Eq, PartialEq, Debug, Clone, Copy, Hash)]
#[non_exhaustive]
pub enum DatasetSyntax { pub enum DatasetSyntax {
/// [N-Quads](https://www.w3.org/TR/n-quads/) /// [N-Quads](https://www.w3.org/TR/n-quads/)
NQuads, NQuads,

@ -99,7 +99,10 @@ impl From<QuerySolutionsIterator> for QueryResult {
} }
/// [SPARQL query](https://www.w3.org/TR/sparql11-query/) serialization formats /// [SPARQL query](https://www.w3.org/TR/sparql11-query/) serialization formats
///
/// This enumeration is non exhaustive. New syntaxes like CSV will be added in the future.
#[derive(Eq, PartialEq, Debug, Clone, Copy, Hash)] #[derive(Eq, PartialEq, Debug, Clone, Copy, Hash)]
#[non_exhaustive]
pub enum QueryResultSyntax { pub enum QueryResultSyntax {
/// [SPARQL Query Results XML Format](http://www.w3.org/TR/rdf-sparql-XMLres/) /// [SPARQL Query Results XML Format](http://www.w3.org/TR/rdf-sparql-XMLres/)
Xml, Xml,

Loading…
Cancel
Save