From cc6ca5fe1ea1a48f23f4c577a9c7edc18b1c5cbc Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Champin Date: Sun, 5 Apr 2020 20:14:15 +0200 Subject: [PATCH] making unchecked constructor of Literal public for the same reason as before: bindings to other languages/APIs can benefit from this --- lib/src/model/literal.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/src/model/literal.rs b/lib/src/model/literal.rs index 1414b3f6..78812014 100644 --- a/lib/src/model/literal.rs +++ b/lib/src/model/literal.rs @@ -73,7 +73,14 @@ impl Literal { })) } - pub(crate) fn new_language_tagged_literal_unchecked( + /// Builds a RDF [language-tagged string](https://www.w3.org/TR/rdf11-concepts/#dfn-language-tagged-string) + /// + /// It is the responability of the caller to check that `language` + /// is valid [BCP47](https://tools.ietf.org/html/bcp47) language tag. + /// + /// If in doubt, you should rather use + /// [`new_language_tagged_literal`](#method.new_language_tagged_literal). + pub fn new_language_tagged_literal_unchecked( value: impl Into, language: impl Into, ) -> Self {