1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use crate::{lexical::LexicalFormOf, Datatype, ParseRdf, XsdDatatype};

pub type String = std::string::String;

impl XsdDatatype for String {
	fn type_(&self) -> Datatype {
		Datatype::String(None)
	}
}

impl LexicalFormOf<String> for str {
	type ValueError = std::convert::Infallible;

	fn try_as_value(&self) -> Result<String, Self::ValueError> {
		Ok(self.to_string())
	}
}

impl ParseRdf for String {
	type LexicalForm = str;
}