1#![deny(rust_2018_idioms)]
7pub mod ast;
8pub use ast::*;
9
10#[derive(Debug, Clone, Default)]
13pub enum ShaclFormat {
14 Internal,
15 #[default]
16 Turtle,
17 NTriples,
18 RdfXml,
19 TriG,
20 N3,
21 NQuads,
22 JsonLd,
23}
24
25impl ShaclFormat {
26 pub fn mime_type(&self) -> &str {
28 match self {
29 ShaclFormat::Internal => "application/shacl+json",
30 ShaclFormat::Turtle => "text/turtle",
31 ShaclFormat::NTriples => "application/n-triples",
32 ShaclFormat::RdfXml => "application/rdf+xml",
33 ShaclFormat::TriG => "application/trig",
34 ShaclFormat::N3 => "text/n3",
35 ShaclFormat::NQuads => "application/n-quads",
36 ShaclFormat::JsonLd => "application/ld+json",
37 }
38 }
39}