Skip to main content

edc_dataplane_core/core/model/
namespace.rs

1pub struct Namespace<'a>(&'a str);
2
3impl<'a> Namespace<'a> {
4    pub fn to_iri(&self, term: &str) -> String {
5        format!("{}{}", self.0, term)
6    }
7
8    pub fn ns(&self) -> &'a str {
9        self.0
10    }
11}
12
13pub static EDC_NAMESPACE: Namespace<'static> = Namespace("https://w3id.org/edc/v0.0.1/ns/");
14
15pub static DSPACE_NAMESPACE: Namespace<'static> = Namespace("https://w3id.org/dspace/v0.8/");
16
17pub static IDSA_NAMESPACE: Namespace<'static> = Namespace("https://w3id.org/idsa/v4.1/");